[Core] Support to order data by columns in append only writer#7886
Open
FangYongs wants to merge 1 commit into
Open
[Core] Support to order data by columns in append only writer#7886FangYongs wants to merge 1 commit into
FangYongs wants to merge 1 commit into
Conversation
Contributor
Author
|
@Aitozi @shidayang Have a look when you're free |
Aitozi
reviewed
May 19, 2026
| coreOptions.clusteringIncrementalEnabled() | ||
| && coreOptions.clusteringIncrementalOptimizeWrite() | ||
| && coreOptions.clusteringIncrementalMode() | ||
| == CoreOptions.ClusteringIncrementalMode.LOCAL_SORT |
Contributor
There was a problem hiding this comment.
The LOCAL_SORT is described as Task-Level sorting, but what we have actually implemented is File-Level sorting.
Do we need to introduce a mode similar to "file_local" to represent this specific granularity of File-Level sorting functionality?
/**
* Sort rows only within each compaction task (no global shuffle). Every output file is
* internally ordered by the clustering columns, which is sufficient for per-file Parquet
* lookup optimizations.
*/
LOCAL_SORT(
"local-sort",
"Sort rows only within each compaction task without global shuffle. Every output file is internally ordered.");
Contributor
Author
There was a problem hiding this comment.
@JingsongLi What do you think of LOCAL_SORT? In our previous discussion, this was meant for local sorting in a single file. However, judging from the current situation, it is used for data sorting at the task level.
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.
Purpose
Order data by specific columns in single file which is written by append only writer
Tests
AppendOnlyWriterTest#testSortedBufferedSinkWriter
Close #7885