Stefan Savic created SPARK-60838:
------------------------------------
Summary: Reuse canonicalization width helpers in VariantBuilder
encoders
Key: SPARK-60838
URL: https://issues.apache.org/jira/browse/SPARK-60838
Project: Spark
Issue Type: Improvement
Components: SQL
Affects Versions: 5.0.0
Reporter: Stefan Savic
Follow-up to SPARK-59151 (CanonicalizeVariant), which adds canonical-only
helpers to VariantBuilder (minimalLongTypeInfo, minimalDecimalTypeInfo,
VariantUtil.metadataHeader) while leaving the existing append paths untouched
to keep that PR focused.
Refactor VariantBuilder so that the existing encoders share these helpers with
the canonicalization code:
- appendLong picks the integer width via minimalLongTypeInfo
- appendDecimal picks the decimal width via minimalDecimalTypeInfo
- result() writes the metadata header via VariantUtil.metadataHeader
No behavior change; the goal is a single implementation of each encoding-width
rule so that isCanonical and the builders cannot drift apart.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]