Support non time order in MSQ compaction#17318
Merged
kfaraz merged 2 commits intoapache:masterfrom Nov 27, 2024
Merged
Conversation
kfaraz
approved these changes
Nov 27, 2024
| : ColumnHolder.TIME_COLUMN_NAME; | ||
| ColumnMapping timeColumnMapping = new ColumnMapping(timeColumn, ColumnHolder.TIME_COLUMN_NAME); | ||
| if (dataSchema.getDimensionsSpec().isForceSegmentSortByTime()) { | ||
| // When not sorted by time, the __time column is missing from dimensionsSpec |
Contributor
There was a problem hiding this comment.
Suggested change
| // When not sorted by time, the __time column is missing from dimensionsSpec | |
| // When sorted by time, the __time column is missing from dimensionsSpec |
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.
Description
#16849 added support for sorting segments with non-time columns. This PR extends that support to MSQ compaction. Specifically, if
forceSegmentSortByTimeis set in the data schema -- either in the user-supplied compaction config or in the inferred schema -- the following steps are taken:__timeexplicitly as the first column to the dimension schema since it already comes as part of the schema__timein the order specified by the schemaforceSegmentSortByTimein the MSQ context.Also, the PR adds (missing) unit tests for verifying MSQ spec generated with nested and auto-type columns
This PR has: