Repository navigation
Conversation
joacoc
force-pushed
the
footer-sort-key
branch
from
October 29, 2026 16:38
d327245 to
b5abb7e
Compare
Contributor
|
We need not change the footer, but use the new nested footer stats + AggFns |
Contributor
Author
|
@joseph-isaacs yeap, I just cleaned it up. I already have the new AggFn, but I'm still refining it a bit |
Contributor
Author
|
Ok, so a bit of an overview, the options for the aggfn are like this: pub struct SortOrderOptions {
pub fields: Vec<(FieldName, SortDirection)>
}The sort uses I still have to do some checks around the writer and bench. |
joacoc
marked this pull request as ready for review
October 30, 2026 16:26
connortsui20
added a commit
that referenced
this pull request
Nov 2, 2026
U2, U3, U4, U6, U7 and U8 merged on 2026-11-02 in #11012, #11014 and #11016, and the DataFusion literal fix #11067 merged right after U2. So order constraint 1 holds, and phase 1 starts from develop. The graph shows these nodes as merged, and parts 2 and 4 name the PR that fixed each finding. #10953 now keeps i32 days and widens only the days part to i64 when a value does not fit. It has no review, and it conflicts with the DateTimeParts compare kernel that U2 changed. #11056 still waits on its request for changes. #10661 replaces the closed #10482 for file sort statistics. In the type roadmap, only the N1 sentence changes. Signed-off-by: Connor Tsui <[email protected]>
12 of 49 tasks
connortsui20
added a commit
that referenced
this pull request
Nov 3, 2026
…11114 Each node of the graph is now one PR, with the ID that the PR plan in #11114 uses. The claims node points to #11115, the old phase 1 node splits into NU and CL, and the shared pushdown and the lift rule become separate low-priority nodes. The graph also links #10661, #10686 and #10793 as open PRs to coordinate with. Signed-off-by: Connor Tsui <[email protected]>
joseph-isaacs
approved these changes
Nov 9, 2026
Sort keys indicate that a file is lexicographically sorted. The current implementation writes and reads sort keys present in a footer. One currently missing piece is that it doesn't assert that the rows are truly sorted, so a user could write an unsorted file and declare in the footer that the rows are sorted. To add this assertion, we could use an agg_fn that checks multiple columns at the same time and validates that the rows are sorted across all chunks. Signed-off-by: Joaquin Colacci <[email protected]>
Unintended changes. Signed-off-by: Joaquin Colacci <[email protected]>
Signed-off-by: Joaquin Colacci <[email protected]>
Signed-off-by: Joaquin Colacci <[email protected]>
When reviewing the code, I noticed that footer properties are always vectors, so I stopped to think about whether a vec of sort keys would make sense, and it turns out that yes, even DataFusion can support multiple sort keys. So what I did was just update it from a single sort key to multiple valid sort keys. Also added SortKey and SortKeyRef as type aliases. Signed-off-by: Joaquin Colacci <[email protected]>
The previous work was incorrectly writing the sort keys in the footer as a spec rather than writing them as an aggregate function. This commit cleans up the previous incorrect work. Signed-off-by: Joaquin Colacci <[email protected]>
This commit adds the SortOrder aggregate fn into the `vortex-array` crate. The new `SortOrder` basically reuses the sort already implemented for fastpaths, so it has the same limitations (only ASC and nulls first). The `SortOptions` are ser/de using protobuf, and there is no support for strictness, but I could simple be added. I tried to add enough documentation to understand how the pair check works. Signed-off-by: Joaquin Colacci <[email protected]>
I think the most important to measure is for utf-8 and the single column bench to assert that not much on top of the fastest case (single column/field sort), similar to `IsSorted`. Signed-off-by: Joaquin Colacci <[email protected]>
Similar to other new agg fns, they need to be added to the unstable edition. Also, this commit adds a test to check that the aggregate fn is correctly written into the file stats, but it is not present in the layout zones. Signed-off-by: Joaquin Colacci <[email protected]>
Given that already exists `IsSorted` and `IsStrictSorted` I found appropiate to call it `IsCompoundSorted`. Signed-off-by: Joaquin Colacci <[email protected]>
Signed-off-by: Joaquin Colacci <[email protected]>
joacoc
force-pushed
the
footer-sort-key
branch
from
November 10, 2026 10:29
4d6d6a5 to
51f6866
Compare
There was one pending TODO about where to check whether the root entry was compatible with the `IsCompoundSorted` agg fn. This is just a fix for that, the check now lives in `FileStatsAccumulator::try_new`. If the root has no entry for the stats, the write should err. Otherwise the stat won't be written and the user won't notice. So, if the user requests `IsCompoundSorted` with legacy stats, or with a non-nullable root (which has no root entry), the write now errs. Signed-off-by: Joaquin Colacci <[email protected]>
Contributor
Author
|
@joseph-isaacs, rebased and also fixed a |
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.
Adds a new agg fn to check a compound sort key and store the result in the file stats.
Summary
The current implementation adds a new aggregate function called
IsCompoundSortedthat lets the user check whether rows are sorted by a declared compound key. It uses the same sort order asIsSorted, so it has the same limitations (onlyASCwith nulls first.)Changes
IsCompoundSortedagg fn and its optionsAPI Changes