Skip to content

GH-50915: [FORMAT] Allow TIMESTAMP logical type to annotate FIXED_LEN_BYTE_ARRAY(12) - #50916

Open
divjotarora wants to merge 2 commits into
apache:mainfrom
divjotarora:flba-12
Open

GH-50915: [FORMAT] Allow TIMESTAMP logical type to annotate FIXED_LEN_BYTE_ARRAY(12)#50916
divjotarora wants to merge 2 commits into
apache:mainfrom
divjotarora:flba-12

Conversation

@divjotarora

@divjotarora divjotarora commented Aug 19, 2026

Copy link
Copy Markdown

Rationale for this change

See apache/parquet-format#600 for rationale.

What changes are included in this PR?

This PR adds support for using TimestampType to annotate FIXED_LEN_BYTE_ARRAY(12) values.

Are these changes tested?

Yes, via unit tests and an e2e test that reads the file added in parquet-testing (apache/parquet-testing#123).

Are there any user-facing changes?

No

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #50915 has been automatically assigned in GitHub to PR creator.


return ::arrow::fixed_size_binary(physical_length);
case LogicalType::Type::TIMESTAMP:
return ::arrow::fixed_size_binary(physical_length);

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 think this should probably be configurable. We should probably have a mode that takes returns the arrow timestamp type (and either errors on overflow or converts to MIN/MAX representable values., maybe a different config value?)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Ack, added convert_flba_timestamps and flba_timestamp_clamp_on_overflow properties to control conversion from FLBA(12) --> Arrow timestamps and clamping to min/max int64 vs. erroring for values out of the int64 range, respectively

Comment thread cpp/src/parquet/reader_test.cc
Comment thread cpp/src/parquet/statistics.cc Outdated

@emkornfield emkornfield left a comment

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.

Some questions and comments I think the biggest one is scope and whether we should have an option to convert this value to a proper arrow type. Wemight also want to make it configurable the target of the arrow type

@github-actions github-actions Bot added the awaiting review Awaiting review label Aug 20, 2026
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.

2 participants