rdblue commented on a change in pull request #828: iceberg-spark changes for 
vectorized reads
URL: https://github.com/apache/incubator-iceberg/pull/828#discussion_r389137444
 
 

 ##########
 File path: spark/src/main/java/org/apache/iceberg/spark/source/Reader.java
 ##########
 @@ -305,61 +342,74 @@ public Statistics estimateStatistics() {
   @Override
   public String toString() {
     return String.format(
-        "IcebergScan(table=%s, type=%s, filters=%s, caseSensitive=%s)",
-        table, lazySchema().asStruct(), filterExpressions, caseSensitive);
+        "IcebergScan(table=%s, type=%s, filters=%s, caseSensitive=%s, 
batchedReads=%s)",
+        table, lazySchema().asStruct(), filterExpressions, caseSensitive, 
enableBatchRead);
   }
 
-  private static class ReadTask implements InputPartition<InternalRow>, 
Serializable {
-    private final CombinedScanTask task;
+  @SuppressWarnings("checkstyle:VisibilityModifier")
+  private static class BaseReadTask implements Serializable {
+    final CombinedScanTask task;
     private final String tableSchemaString;
     private final String expectedSchemaString;
-    private final Broadcast<FileIO> io;
-    private final Broadcast<EncryptionManager> encryptionManager;
-    private final boolean caseSensitive;
-    private final boolean localityPreferred;
+    final Broadcast<FileIO> io;
+    final Broadcast<EncryptionManager> encryptionManager;
+    final boolean caseSensitive;
 
     private transient Schema tableSchema = null;
     private transient Schema expectedSchema = null;
-    private transient String[] preferredLocations;
 
-    private ReadTask(CombinedScanTask task, String tableSchemaString, String 
expectedSchemaString,
-                     Broadcast<FileIO> io, Broadcast<EncryptionManager> 
encryptionManager,
-                     boolean caseSensitive, boolean localityPreferred) {
+    BaseReadTask(CombinedScanTask task, String tableSchemaString, String 
expectedSchemaString,
 
 Review comment:
   Looks like the only differences between the batch and row tasks is the 
locality and batch size. Locality should probably be supported by both. If 
that's done, then do we need 3 classes? What about using one and using 
`batchSize=1` for row-based tasks? Then we'd be able to have just one class for 
both cases.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to