aokolnychyi commented on a change in pull request #1955:
URL: https://github.com/apache/iceberg/pull/1955#discussion_r545709695



##########
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:
       I see we call distinct in `schemaWithMetadataColumns`, never mind.




----------------------------------------------------------------
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