Skip to content

[GH-3609]: Add new sort order for int96 timestamps#3610

Open
divjotarora wants to merge 6 commits into
apache:masterfrom
divjotarora:int96-stats
Open

[GH-3609]: Add new sort order for int96 timestamps#3610
divjotarora wants to merge 6 commits into
apache:masterfrom
divjotarora:int96-stats

Conversation

@divjotarora

@divjotarora divjotarora commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

See parquet-format proposal for rationale: apache/parquet-format#584

What changes are included in this PR?

Add new INT96_TIMESTAMP_ORDER sort order and related parsing.

Are these changes tested?

Yes, new unit tests.

Are there any user-facing changes?

Two new flags and a Thrift change.

Closes #3609

Comment thread parquet-column/src/main/java/org/apache/parquet/column/ParquetProperties.java Outdated
Comment thread parquet-column/src/main/java/org/apache/parquet/schema/ColumnOrder.java Outdated
Comment thread parquet-column/src/main/java/org/apache/parquet/schema/PrimitiveComparator.java Outdated
Comment thread parquet-column/src/main/java/org/apache/parquet/schema/PrimitiveType.java Outdated
Comment thread parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileWriter.java Outdated
Comment thread parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetInputFormat.java Outdated
@wgtmac

wgtmac commented Jun 25, 2026

Copy link
Copy Markdown
Member

Please resolve the conflicts.

@divjotarora

Copy link
Copy Markdown
Contributor Author

Please resolve the conflicts.

@wgtmac Sorry for the delay, I was on holiday last week. Conflicts are resolved now

Comment thread parquet-column/src/main/java/org/apache/parquet/schema/PrimitiveType.java Outdated
@rdblue

rdblue commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

I think there are a few things to be fixed, but overall I trust that this works.

@divjotarora divjotarora requested a review from rdblue July 13, 2026 16:51
Comment thread parquet-column/src/main/java/org/apache/parquet/schema/PrimitiveComparator.java Outdated
case UNDEFINED:
return false;
default:
throw new IllegalArgumentException("Unknown column order: " + type.columnOrder());

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.

Nit: I think we would normal throw UnsupportedOperationException since this is a valid argument (it's an enum after all).

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.

Prefer to leave IllegalArgumentException to match getColumnOrders above

@divjotarora divjotarora requested a review from rdblue July 15, 2026 11:00
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.

Add new sort order for int96 timestamps

3 participants