[ 
https://issues.apache.org/jira/browse/FLINK-40491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ramin Gharib updated FLINK-40491:
---------------------------------
    Description: 
Add read, write, and JSON rendering for the four new variant primitives in the
BinaryVariant core.

Scope:
 - Variant.Type: TIME, TIMESTAMP_NS, TIMESTAMP_LTZ_NS
 - BinaryVariantUtil.getType()/valueSize()/header writers for codes 17-19
 - accessors getTime() -> LocalTime, reuse
  getTimestamp()/getInstant() for the nanosecond timestamps
 - VariantBuilder.of(LocalTime), and precision-aware
  of(Instant)/of(LocalDateTime): codes 18/19 for sub-microsecond, 12/13 
otherwise
 - toJson rendering: TIME ISO, ns timestamps ISO with nanos

Mirrors FLINK-37923, which bundled the BinaryVariant encode/decode/toJson core.
Verifying: round-trip encode/decode per code including Spark/Iceberg-produced
bytes, JSON rendering, and the precision-selection boundary.

  was:
Add read, write, and JSON rendering for the four new variant primitives in the
BinaryVariant core. Independent of the Flink UUID type (getUuid returns
java.util.UUID).

Scope:
- Variant.Type: TIME, TIMESTAMP_NS, TIMESTAMP_LTZ_NS, UUID
- BinaryVariantUtil.getType()/valueSize()/header writers for codes 17-20
- accessors getTime() -> LocalTime, getUuid() -> java.util.UUID; reuse
  getTimestamp()/getInstant() for the nanosecond timestamps
- VariantBuilder.of(LocalTime), of(java.util.UUID), and precision-aware
  of(Instant)/of(LocalDateTime): codes 18/19 for sub-microsecond, 12/13 
otherwise
- toJson rendering: TIME ISO, ns timestamps ISO with nanos, UUID canonical

Mirrors FLINK-37923, which bundled the BinaryVariant encode/decode/toJson core.
Verifying: round-trip encode/decode per code including Spark/Iceberg-produced
bytes, JSON rendering, and the precision-selection boundary.


> Extend BinaryVariant with primitive codes 17-19
> -----------------------------------------------
>
>                 Key: FLINK-40491
>                 URL: https://issues.apache.org/jira/browse/FLINK-40491
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table SQL / API
>            Reporter: Ramin Gharib
>            Assignee: Moritz Manner
>            Priority: Major
>
> Add read, write, and JSON rendering for the four new variant primitives in the
> BinaryVariant core.
> Scope:
>  - Variant.Type: TIME, TIMESTAMP_NS, TIMESTAMP_LTZ_NS
>  - BinaryVariantUtil.getType()/valueSize()/header writers for codes 17-19
>  - accessors getTime() -> LocalTime, reuse
>   getTimestamp()/getInstant() for the nanosecond timestamps
>  - VariantBuilder.of(LocalTime), and precision-aware
>   of(Instant)/of(LocalDateTime): codes 18/19 for sub-microsecond, 12/13 
> otherwise
>  - toJson rendering: TIME ISO, ns timestamps ISO with nanos
> Mirrors FLINK-37923, which bundled the BinaryVariant encode/decode/toJson 
> core.
> Verifying: round-trip encode/decode per code including Spark/Iceberg-produced
> bytes, JSON rendering, and the precision-selection boundary.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to