JingsongLi commented on PR #8236: URL: https://github.com/apache/paimon/pull/8236#issuecomment-4737633306
I think adding operation as a dedicated nullable field in Snapshot is a better direction than storing it in properties. The parsing overhead should be negligible. Snapshot metadata is already read and deserialized as JSON, so one additional nullable string/enum field will not have meaningful performance impact compared with filesystem IO and manifest planning. With @JsonInclude(NON_NULL), old snapshots and snapshots without operation will not carry extra JSON size either. Compatibility should also be fine: - Old snapshots do not have this field, so the new reader can treat it as null. - Older readers should ignore the new field because Snapshot already uses @JsonIgnoreProperties(ignoreUnknown = true). I would suggest modeling it as a first-class nullable enum or string field, for example Snapshot.Operation, rather than putting it into properties. commitKind describes the physical snapshot change, while operation describes the logical user operation, so both feel like core snapshot metadata. This would also avoid introducing a generic withCommitProperties API just for one standard field, and avoids potential conflicts around the "operation" property key. -- 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]
