parthchandra commented on code in PR #2032:
URL: https://github.com/apache/datafusion-comet/pull/2032#discussion_r2220720094


##########
common/src/main/java/org/apache/comet/parquet/BatchReader.java:
##########
@@ -377,12 +374,15 @@ public void init() throws URISyntaxException, IOException 
{
     }
   }
 
-  public void setSparkSchema(StructType schema) {
-    this.sparkSchema = schema;
+  // Used by Iceberg only.
+  public void initByIceberg(AbstractColumnReader[] columnReaders) {
+    this.columnReaders = columnReaders;
+    this.isInitialized = true;
   }
 
-  public AbstractColumnReader[] getColumnReaders() {
-    return columnReaders;
+  // Used by Iceberg only.
+  public void setSparkSchema(StructType schema) {

Review Comment:
   This can be. part of the new constructor?



##########
common/src/main/java/org/apache/comet/parquet/BatchReader.java:
##########
@@ -377,12 +374,15 @@ public void init() throws URISyntaxException, IOException 
{
     }
   }
 
-  public void setSparkSchema(StructType schema) {
-    this.sparkSchema = schema;
+  // Used by Iceberg only.
+  public void initByIceberg(AbstractColumnReader[] columnReaders) {

Review Comment:
   Just `init`? 
   It would be clearer if we simply created a new class extending BatchReader 
that the Iceberg specific methods are in. Leaves no room for confusion.



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to