wypoon commented on a change in pull request #3722:
URL: https://github.com/apache/iceberg/pull/3722#discussion_r768289789
##########
File path:
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/source/SparkTable.java
##########
@@ -186,22 +185,24 @@ public ScanBuilder
newScanBuilder(CaseInsensitiveStringMap options) {
icebergTable.refresh();
}
- SparkScanBuilder scanBuilder = new SparkScanBuilder(sparkSession(),
icebergTable, options);
-
- if (requestedSchema != null) {
- scanBuilder.pruneColumns(requestedSchema);
- }
-
- return scanBuilder;
+ return new SparkScanBuilder(sparkSession(), icebergTable,
addSnapshotId(options));
Review comment:
`SparkTable#schema` already returns `snapshotSchema()` converted to
Spark's `StructType`. Here, as you suggest, I construct the `SparkScanBuilder`
with the `snapshotSchema()`. So we are consistent.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]