Repository navigation
fix: apply the catalog's targetSegmentRows to MSQ ingestion - #20561
Merged
FrankChen021 merged 1 commit intoOct 17, 2026
Merged
Conversation
DruidSqlValidator wrote the catalog's targetSegmentRows under msqRowsPerSegment, a key MSQ never reads, so MSQ ignored it and used its default. Write it under rowsPerSegment, the key MSQ reads.
3 tasks done
FrankChen021
commented
Oct 13, 2026
FrankChen021
left a comment
Member
Author
There was a problem hiding this comment.
🟢 Approval recommended
The corrected context key matches MSQ’s rowsPerSegment key, so catalog targetSegmentRows reaches MSQ tuning while explicit query-context values retain precedence. No actionable issue blocks merging.
Reviewed 2 of 2 changed files.
Validation: git diff --check passed. No builds or tests were run.
This is an automated review by Codex GPT-5.6-Luna(max)
3 tasks done
GWphua
approved these changes
Oct 17, 2026
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
When an INSERT or REPLACE targets a catalog table with
targetSegmentRows,DruidSqlValidatorcopies that value into the query context. It used the keymsqRowsPerSegment, but MSQ readsrowsPerSegment(MultiStageQueryContext.CTX_ROWS_PER_SEGMENT). Nothing ever readmsqRowsPerSegment, so the catalog value was ignored and MSQ used its default of 3,000,000 rows. The mismatch dates back to #15908.This PR changes
DruidSqlValidator.CTX_ROWS_PER_SEGMENTtorowsPerSegment. ArowsPerSegmentset in the query context still takes precedence over the catalog value.Release note
For SQL-based ingestion into a catalog table, the table's
targetSegmentRowsproperty now sets the target number of rows per segment. Previously it was ignored, and the default of 3,000,000 rows was used.Key changed/added classes in this PR
DruidSqlValidatorCalciteCatalogIngestionDmlTestThis PR has: