Repository navigation
Support serializable date buckets in codec-java - #443
Conversation
Add date bucket metadata to group fields and keep derived formatting state out of Java serialization. Reconstruct transient state after deserialization so nested LabelDTO metadata remains usable in bulk-load and distributed processing clients. Tested: :codec-java:test (BucketTests, LabelDTOTests) Tested: :codec-java:spotlessCheck 🤖 Generated with Codex (gpt-5.5) Co-Authored-By: Codex <[email protected]>
Keep the nullable bucket out of the Jackson creator so metadata from earlier releases and explicit null values remain deserializable when strict creator null checks are enabled. Tested: :codec-java:test (LabelDTOTests) Tested: :codec-java:spotlessCheck 🤖 Generated with Codex (gpt-5.6-sol) Co-Authored-By: Codex <[email protected]>
|
@eazyhozy |
|
@zipdoki Sure. I published codec-java from this branch and rebuilt the downstream Spark bulk-load jobs against it. I am replaying an actual bulk load through the metadata-creation stage. I will report whether the replay completes through that stage and whether the newly created table preserves the existing schema, especially its groups and date-bucket metadata (name, unit, timezone, and format). I will also run a historical AGG query; an empty result is expected at this point because EdgeGroup bulk-load encoding is introduced separately in #397. |
|
@zipdoki Validation completed successfully:
This confirms that |
|
Optimistic Merge |
Summary
At the time of this change, neither
mainnorcodec-java/0.4.xdefines date bucket metadata, and the published codec-java 0.4.0 artifact has noBuckettype orGroup.Field.bucket. When metadata contains a date bucket, strict deserializers can reject the unknownbucketproperty and fail to load the metadata, while tolerant deserializers can silently discard the bucket definition. In the latter case, downstream bulk-load or distributed processing can group by raw timestamp values instead of the formatted bucket values expected by the metadata.This PR adds date bucket metadata support to codec-java group fields and preserves compatibility with 0.4.0-shaped metadata where
bucketis missing or explicitly null. It also keeps derivedZoneIdandDateTimeFormatterstate out of Java serialization and reconstructs that state after deserialization so nestedLabelDTOmetadata remains usable.Closes: N/A
This PR is a prerequisite for #397 and should be merged first.
Changes
Group.Field.bucketis missing or null, including strict creator-null checks.ZoneIdandDateTimeFormatterstate out of Java serialization and reconstruct it after deserialization.LabelDTOJava serialization round trips.How to Test
./gradlew :codec-java:test --tests com.kakao.actionbase.v2.core.metadata.BucketTests --tests com.kakao.actionbase.v2.core.metadata.LabelDTOTests./gradlew :codec-java:spotlessCheckAI Assistance
🤖 Generated with Codex (gpt-5.6-sol)