aokolnychyi commented on a change in pull request #1955:
URL: https://github.com/apache/iceberg/pull/1955#discussion_r545709279
##########
File path:
spark3/src/main/java/org/apache/iceberg/spark/source/SparkScanBuilder.java
##########
@@ -131,28 +138,52 @@ public SparkScanBuilder caseSensitive(boolean
isCaseSensitive) {
@Override
public void pruneColumns(StructType requestedSchema) {
- this.requestedProjection = requestedSchema;
+ this.requestedProjection = new
StructType(Stream.of(requestedSchema.fields())
+ .filter(field -> MetadataColumns.nonMetadataColumn(field.name()))
+ .toArray(StructField[]::new));
+
+ Stream.of(requestedSchema.fields())
Review comment:
Are there any cases when `pruneColumns` is going to be called multiple
times? Should we worry about it at all?
----------------------------------------------------------------
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]