You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(schema): align v3 default-value validation/serde with spec and Java
Addresses wgtmac's review feedback:
- Enforce UTC offset for timestamptz / timestamptz_ns default values in
FieldFromJson. The shared timestamp parser accepts any offset and silently
normalizes to UTC, so C++ could accept default metadata Java rejects and
rewrite the offset on write. Added TemporalUtils::IsUtcOffset, which reuses
the existing timezone-suffix parser.
- ValidateDefault now casts the default literal to the field type (Literal::CastTo)
instead of requiring an exact type match, matching Java's Types.NestedField
(e.g. an int default on a long field). Uncastable or out-of-range defaults are
still rejected.
- Documented that non-primitive (struct/list/map) defaults remain unsupported,
matching Java's current model.
- Extended the json_serde round-trip tests with time/timestamptz/timestamp_ns/
timestamptz_ns and a negative case for non-UTC timestamptz defaults; added a
schema test for the cast-to-field-type behavior.
0 commit comments