RussellSpitzer commented on a change in pull request #2282:
URL: https://github.com/apache/iceberg/pull/2282#discussion_r584895791



##########
File path: 
spark3/src/main/java/org/apache/iceberg/spark/source/SparkBatchScan.java
##########
@@ -156,12 +170,20 @@ public PartitionReaderFactory createReaderFactory() {
 
     boolean hasNoDeleteFiles = 
tasks().stream().noneMatch(TableScanUtil::hasDeletes);
 
+    boolean hasTimestampWithoutZone = hasTimestampWithoutZone(expectedSchema);
+
     boolean readUsingBatch = batchReadsEnabled && hasNoDeleteFiles && 
(allOrcFileScanTasks ||
-        (allParquetFileScanTasks && atLeastOneColumn && onlyPrimitives));
+            (allParquetFileScanTasks && atLeastOneColumn && onlyPrimitives && 
!hasTimestampWithoutZone));
 
     return new ReaderFactory(readUsingBatch ? batchSize : 0);
   }
 
+  private static boolean hasTimestampWithoutZone(Schema schema) {

Review comment:
       Another candidate for the public utility class




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