RussellSpitzer commented on code in PR #14040:
URL: https://github.com/apache/iceberg/pull/14040#discussion_r2356649727
##########
parquet/src/main/java/org/apache/iceberg/parquet/Parquet.java:
##########
@@ -1245,10 +1252,26 @@ public ReadBuilder
createBatchedReaderFunc(Function<MessageType, VectorizedReade
Preconditions.checkArgument(
this.readerFuncWithSchema == null,
"Cannot set batched reader function: 2-argument reader function
already set");
+ Preconditions.checkArgument(
+ this.internalReader == null,
+ "Cannot set batched reader function: internal reader already set");
this.batchedReaderFunc = func;
return this;
}
+ public ReadBuilder useInternalReader(InternalReader<?> reader) {
+ Preconditions.checkArgument(
+ this.readerFunc == null, "Cannot set internal reader: reader
function already set");
+ Preconditions.checkArgument(
+ this.readerFuncWithSchema == null,
+ "Cannot set internal reader: 2-argument reader function already
set");
+ Preconditions.checkArgument(
+ this.internalReader == null, "Cannot set internal reader: internal
reader already set");
Review Comment:
Fixed, also changed this structure so now there is only a ReaderFunction and
a batchedReaderFunc so we don't have all these preconditions. In the future I
think we probably should reduce the interface again so there is only a single
field ReaderFunction and we parameterize it some how so we can still get this
to work. Like
```
ReaderFunction<T> and
ParquetReaderFunction extends ReaderFunction<ParquetValueReader>
BatchedReaderFunction extends ReaderFunction<VectorizedReader>
```
Or something like that?
We can talk about that later too
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]