RussellSpitzer commented on code in PR #14040:
URL: https://github.com/apache/iceberg/pull/14040#discussion_r2360008171


##########
parquet/src/main/java/org/apache/iceberg/parquet/Parquet.java:
##########
@@ -1220,35 +1274,43 @@ public ReadBuilder createReaderFunc(
           this.batchedReaderFunc == null,
           "Cannot set reader function: batched reader function already set");
       Preconditions.checkArgument(
-          this.readerFuncWithSchema == null,
-          "Cannot set reader function: 2-argument reader function already 
set");
-      this.readerFunc = newReaderFunction;
+          this.readerFunction == null, "Cannot set reader function: reader 
function already set");

Review Comment:
   Hmm, it is a behavior change. I could allow the old behavior and allow 
resetting if the class of the ReaderFunction matches the previous class but 
failing if it's different. 
   
   Ie:
   
   If this.readerFunction.class == readerFunction.class 
      this.readerFunction = readerFunction
      
    So it wouldn't be a huge deal, but I think it's a weird behavior but it is 
an established one... Maybe we fix it in 2.0



-- 
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: issues-unsubscr...@iceberg.apache.org

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


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

Reply via email to