Repository navigation
Conversation
…ndex The column writer decided `boundary_order` by comparing the actual min and max of each page, while the column index holds truncated lower and upper bounds. Truncation can change the order of the values: - a UTF-8 string is cut at a character boundary, so two strings can keep a different number of bytes - a truncated upper bound is incremented, and the increment can carry The writer could then record `ASCENDING` or `DESCENDING` for bounds that are not in that order. The order is now derived when the column chunk is closed, from the bounds that the column index holds. Co-Authored-By: Claude Mythos 5.2 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
boundary_orderin the Parquet column index when min/max values are truncated #12479Rationale for this change
See #12479.
What changes are included in this PR?
The column writer no longer tracks
boundary_orderpage by page. When the column chunk is closed, it derives the order frommin_valuesandmax_valuesof the built column index, skipping null pages. The comparison is the same ascompare_greater; forBYTE_ARRAYandFIXED_LEN_BYTE_ARRAYthe same Float16, decimal, or byte-wise comparison is applied to the bytes in the index. Apub(crate)setter is added toColumnIndexMetaData.For columns whose bounds are not truncated, the result is the same as before.
Are these changes tested?
Yes. Two new tests fail without the fix:
test_column_index_boundary_order_of_truncated_valueswrites the data from #12479 withArrowWriterand expectsUNORDERED, andtest_boundary_order_of_truncated_valuescovers a truncated binary upper bound whose increment carries.test_boundary_order_logical_typealso gets a decimal case.Are there any significant user-facing changes?
No
AI usage disclosure
All of the code was written by Claude Mythos 5.2, and I reviewed it myself.