Skip to content

GH-600: Allow TimestampType to annotate FLBA(12) - #601

Open
divjotarora wants to merge 1 commit into
apache:masterfrom
divjotarora:flba12-ts
Open

GH-600: Allow TimestampType to annotate FLBA(12)#601
divjotarora wants to merge 1 commit into
apache:masterfrom
divjotarora:flba12-ts

Conversation

@divjotarora

Copy link
Copy Markdown
Contributor

Rationale for this change

This PR implements the changes described in the proposal document to add support for extended precision nanosecond timestamps that cover the full ANSI SQL timestamp range (years 0000-9999).

What changes are included in this PR

Spec changes to allow the TimestampType logical type to annotate the FIXED_LEN_BYTE_ARRAY physical type with type_length = 12.

Do these changes have PoC implementations?

The parquet-java change is in progress.

Closes #600

Comment thread LogicalTypes.md
since the Unix epoch.

For the `FIXED_LEN_BYTE_ARRAY` carrier (with `type_length = 12`), the value is a
signed 96-bit two's-complement little-endian integer count of `unit`s since the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we do big-endian here so that we can use the same signed two complements byte compare we use for DECIMAL in FLBA.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose little-endian because it seems to match the rest of the spec (DECIMAL is the only deviation). But I don't have a strong preference, happy to change it to big-endian. I'd like to hear from others to see if anyone else agrees/disagrees.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support extended precision for nanosecond timestamps

3 participants