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



##########
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:
       This was the idea on not putting schema in the context: 
https://github.com/apache/iceberg/pull/1115#discussion_r441068118 but I guess 
it could be part of the context, it would need to be initialized and in this 
case another context would need to be created with the new schema from the 
projection.

##########
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:
       This was the idea on not putting schema in the context: 
https://github.com/apache/iceberg/pull/1115#discussion_r441068118 - I guess it 
could be part of the context, it would need to be initialized and in this case 
another context would need to be created with the new schema from the 
projection.




----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to