nssalian commented on code in PR #16292:
URL: https://github.com/apache/iceberg/pull/16292#discussion_r3454325225


##########
spark/v4.1/spark/src/main/java/org/apache/iceberg/spark/source/SparkBatch.java:
##########
@@ -169,6 +171,13 @@ private boolean supportsParquetBatchReads(ScanTask task) {
   }
 
   private boolean supportsParquetBatchReads(Types.NestedField field) {
+    if (field.type().isVariantType()) {
+      return !PropertyUtil.propertyAsBoolean(

Review Comment:
   I moved the detection from the table property `write.parquet.shred-variants` 
to a per-file lowerBounds.containsKey(variantFieldId) check on the  manifest 
entry, so toggling the property after writing shredded files no longer drops 
typed_value data on the batch path. SparkScanBuilder  opts into variant-column 
stats for both the batch and incremental scan paths so the check is available 
without opening any Parquet footers. Added a test too.



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

Reply via email to