Skip to content

Core: Allow date to timestamp promotion for v3 tables - #17744

Open
rambleraptor wants to merge 1 commit into
apache:mainfrom
rambleraptor:date-to-time
Open

Core: Allow date to timestamp promotion for v3 tables#17744
rambleraptor wants to merge 1 commit into
apache:mainfrom
rambleraptor:date-to-time

Conversation

@rambleraptor

Copy link
Copy Markdown
Contributor

The v3 spec allows for promoting a date -> timestamp / timestamp_ns.

This PR allows for the promotion and plumbs through the table formatVersion to make it possible.

There's also an edge case around partitioning for this promotion in particular. According to the spec,

Type promotion is not allowed for a field that is referenced by source-id or source-ids of a partition field if the partition transform would produce a different value after promoting the type

This is only relevant for date -> timestamp / timestamp_ns promotions.

The v3 spec allows promoting `date` to `timestamp` and `timestamp_ns`.
Promotion to `timestamptz` or `timestamptz_ns` is not allowed, and
promotion is rejected when the field is the source of a partition field
whose transform would produce a different value after the promotion
(`identity` and `bucket`; `year`, `month`, `day` and `void` are
unaffected).

Closes apache#16083
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant