wombatu-kun commented on code in PR #16736:
URL: https://github.com/apache/iceberg/pull/16736#discussion_r3385094974
##########
core/src/main/java/org/apache/iceberg/io/ResolvingFileIO.java:
##########
@@ -72,7 +72,7 @@ public class ResolvingFileIO
private final AtomicBoolean isClosed = new AtomicBoolean(false);
private final transient StackTraceElement[] createStack;
private SerializableMap<String, String> properties;
- private SerializableSupplier<Configuration> hadoopConf;
+ private SerializableSupplier<Object> hadoopConf;
Review Comment:
The Object retype here (and the unchecked casts it forces at lines 153, 159,
164, plus both `@SuppressWarnings("unchecked")`) is not required for the
interface swap: `ResolvingFileIO` already has `setConf(Configuration)` and
`getConf()`, and `getConf()` is now just a default it overrides, so this class
compiles unchanged with the field left as
`SerializableSupplier<Configuration>`. Generics are erased, so `Object` buys
nothing at runtime, and unlike the `CatalogUtil`/`RESTTable` Object-for-conf
precedent, this class still references `Configuration` directly in
`setConf`/`getConf`/`serializeConfWith` and the import, so the retype removes
no Hadoop reference. Suggest keeping `SerializableSupplier<Configuration>` and
dropping the three casts and both `@SuppressWarnings`.
--
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]