nastra commented on code in PR #14040:
URL: https://github.com/apache/iceberg/pull/14040#discussion_r2371756709
##########
parquet/src/main/java/org/apache/iceberg/data/parquet/BaseParquetReaders.java:
##########
@@ -75,8 +78,26 @@ protected ParquetValueReader<T> createReader(
}
}
- protected abstract ParquetValueReader<T> createStructReader(
- List<ParquetValueReader<?>> fieldReaders, Types.StructType structType);
+ /**
+ * This method can be overridden to provide a custom implementation which
also uses the fieldId of
+ * the Schema when creating the struct reader
+ */
+ protected ParquetValueReader<T> createStructReader(
+ List<ParquetValueReader<?>> fieldReaders, Types.StructType structType,
Integer fieldId) {
+ // Fallback to the signature without fieldId if not overridden
+ return createStructReader(fieldReaders, structType);
+ }
+
+ /**
+ * @deprecated will be removed in 1.11.0. Subclasses should override {@link
+ * #createStructReader(List, Types.StructType, Integer)} instead
+ */
+ @Deprecated
+ protected ParquetValueReader<T> createStructReader(
+ List<ParquetValueReader<?>> fieldReaders, Types.StructType structType) {
+ throw new UnsupportedOperationException(
Review Comment:
I'm not sure we can actually throw here, isn't that a behavioral change for
when people upgrade their Iceberg version and they were in some place using
`createStructReader(fieldReaders, structType)`?
--
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]