marton-bod commented on a change in pull request #3752:
URL: https://github.com/apache/iceberg/pull/3752#discussion_r772517085
##########
File path: core/src/main/java/org/apache/iceberg/SerializableTable.java
##########
@@ -107,7 +108,13 @@ private String metadataFileLocation(Table table) {
private FileIO fileIO(Table table) {
if (table.io() instanceof HadoopConfigurable) {
- ((HadoopConfigurable) table.io()).serializeConfWith(conf -> new
SerializableConfiguration(conf)::get);
+ HadoopConfigurable configurableIo = (HadoopConfigurable) table.io();
+ if
(configurableIo.getConf().getBoolean(ConfigProperties.CONFIG_SERIALIZATION_DISABLED,
false)) {
+ // do not serialize the Configuration object - configs should be set
on the deserializer-side
+ configurableIo.serializeConfWith(conf -> new
SkipSerializableConfiguration(conf)::get);
+ } else {
+ configurableIo.serializeConfWith(conf -> new
SerializableConfiguration(conf)::get);
+ }
Review comment:
That's a good idea, thanks @rdblue! I have refactored the code to use a
Hive-side config property and call `serializeConfWith` from the Hive storage
handler instead.
The one thing I've noticed and don't really like is that upon using
`SerializationUtil.serializeToBase64(table)`, we enter
`SerializableTable.copyOf()/SerializableTable.fileIO()`, which would overwrite
any potential custom `SerializableSupplier` we might have set earlier for the
table via `serializeConfWith`. I wonder if we might want to provide some
customizability for the `SerializableTable.copyOf()` in the future. But that
could be addressed in a separate PR, if desired.
--
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]