danielcweeks commented on code in PR #17410:
URL: https://github.com/apache/iceberg/pull/17410#discussion_r3739147520
##########
core/src/main/java/org/apache/iceberg/BaseTable.java:
##########
@@ -40,20 +41,34 @@
* when reading the table data after deserialization.
*/
public class BaseTable
- implements Table, HasTableOperations, Serializable,
SupportsDistributedScanPlanning {
+ implements Table,
+ HasTableOperations,
+ Serializable,
+ SupportsDistributedScanPlanning,
+ SupportsLabels {
private final TableOperations ops;
private final String name;
private MetricsReporter reporter;
+ // Ephemeral catalog enrichment, not table state. Transient because it is
not preserved across
+ // serialization: writeReplace() swaps in a SerializableTable for Java
serialization, and any
+ // path that bypasses writeReplace (e.g. Kryo) leaves this null, handled by
labels().
Review Comment:
Actually, I'm not sure why we're not preserving these. I'm a little
concerned because it creates some weird behaviors through serialization. This
table will say it supports labels, but once serialized, it doesn't (since
SerializedTable doesn't support the interface). Maybe this isn't an issue but
I'm also not clear on why we would not maintain it through serialization for
anything wanting this info on a worker/executor side.
--
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]