You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/08/19 04:03:21 UTC

[GitHub] [iceberg] JingsongLi commented on a change in pull request #1353: Core: check that cannot project schema when selected columns is specified

JingsongLi commented on a change in pull request #1353:
URL: https://github.com/apache/iceberg/pull/1353#discussion_r472661716



##########
File path: core/src/main/java/org/apache/iceberg/BaseTableScan.java
##########
@@ -159,6 +159,10 @@ public TableScan option(String property, String value) {
 
   @Override
   public TableScan project(Schema projectedSchema) {
+    if (context.selectedColumns() != null) {
+      throw new IllegalStateException("Cannot project schema when selected columns is specified.");
+    }

Review comment:
       Another thing is: `BaseTableScan.lazyColumnProjection` looks weird. It looks only work for `DataTableScan`. Because other table scan like `MetadataTableScan`, the file/expected scan schema is different from `table.schema()`. But in `BaseTableScan.lazyColumnProjection`, it use `table.schema()` to select. And for `rowFilter`, it looks only works for `DataTableScan` selection, should not affect `MetadataTableScan`s selection.
   
   In other words, we may need to implement different selections for various scans.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org