rdblue commented on a change in pull request #853: Task data reader changes for 
vectorized reads
URL: https://github.com/apache/incubator-iceberg/pull/853#discussion_r395951651
 
 

 ##########
 File path: 
spark/src/main/java/org/apache/iceberg/spark/source/BaseDataReader.java
 ##########
 @@ -23,48 +23,38 @@
 import com.google.common.collect.Iterables;
 import java.io.Closeable;
 import java.io.IOException;
+import java.util.Collections;
 import java.util.Iterator;
 import java.util.Map;
+import org.apache.arrow.util.Preconditions;
 import org.apache.iceberg.CombinedScanTask;
 import org.apache.iceberg.FileScanTask;
-import org.apache.iceberg.Schema;
 import org.apache.iceberg.encryption.EncryptedFiles;
 import org.apache.iceberg.encryption.EncryptionManager;
+import org.apache.iceberg.io.CloseableIterable;
 import org.apache.iceberg.io.FileIO;
 import org.apache.iceberg.io.InputFile;
 import org.apache.spark.rdd.InputFileBlockHolder;
 import org.apache.spark.sql.sources.v2.reader.InputPartitionReader;
 
 /**
- * @param <T> Base class of readers to read data as objects of type @param 
&lt;T&gt;
+ * Base class of readers of type {@link InputPartitionReader} to read data as 
objects of type @param &lt;T&gt;
+ *
+ * @param <T> is the Java class returned by this reader whose objects contain 
one or more rows.
  */
 @SuppressWarnings("checkstyle:VisibilityModifier")
 abstract class BaseDataReader<T> implements InputPartitionReader<T> {
-  final Iterator<FileScanTask> tasks;
-  final Schema tableSchema;
-  final Schema expectedSchema;
-  final FileIO fileIo;
-  final Map<String, InputFile> inputFiles;
-  final boolean caseSensitive;
-
-  Iterator<T> currentIterator;
-  Closeable currentCloseable = null;
-  T current = null;
-  final int batchSize;
+  private final Iterator<FileScanTask> tasks;
+  private final FileIO fileIo;
+  private final Map<String, InputFile> inputFiles;
 
-  BaseDataReader(
-      CombinedScanTask task, Schema tableSchema, Schema expectedSchema, FileIO 
fileIo,
-      EncryptionManager encryptionManager, boolean caseSensitive) {
-    this(task, tableSchema, expectedSchema, fileIo, encryptionManager, 
caseSensitive, -1);
-  }
+  private Iterator<T> currentIterator;
+  Closeable currentCloseable;
 
 Review comment:
   Can this be private?

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