manuzhang commented on code in PR #13786:
URL: https://github.com/apache/iceberg/pull/13786#discussion_r2593035130
##########
parquet/src/main/java/org/apache/iceberg/parquet/Parquet.java:
##########
@@ -1537,6 +1589,27 @@ public <D> CloseableIterable<D> build() {
}
}
+ private static VectorizedParquetReaderFactory loadReaderFactory(String
className) {
+ try {
+ Class<?> factoryClass = Class.forName(className);
+ if
(!VectorizedParquetReaderFactory.class.isAssignableFrom(factoryClass)) {
+ LOG.warn("Class {} does not implement VectorizedParquetReaderFactory
interface", className);
+ return null;
Review Comment:
Rather than `return null` for multiple failure cases, how about
```java
VectorizedParquetReaderFactory factory = null;
try {
Class<?> factoryClass = Class.forName(className);
if (VectorizedParquetReaderFactory.class.isAssignableFrom(factoryClass)) {
factory = (VectorizedParquetReaderFactory)
factoryClass.getDeclaredConstructor().newInstance();
} else {
// log warning
} catch (...) {
// log warning
}
return factory;
}
```
--
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]