FrankChen021 opened a new pull request, #20561:
URL: https://github.com/apache/druid/pull/20561
### Description
When an INSERT or REPLACE targets a catalog table with `targetSegmentRows`,
`DruidSqlValidator` copies that value into the query context. It used the key
`msqRowsPerSegment`, but MSQ reads `rowsPerSegment`
(`MultiStageQueryContext.CTX_ROWS_PER_SEGMENT`). Nothing ever read
`msqRowsPerSegment`, 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_SEGMENT` to
`rowsPerSegment`. A `rowsPerSegment` set in the query context still takes
precedence over the catalog value.
#### Release note
For SQL-based ingestion into a catalog table, the table's
`targetSegmentRows` property now sets the target number of rows per segment.
Previously it was ignored, and the default of 3,000,000 rows was used.
<hr>
##### Key changed/added classes in this PR
* `DruidSqlValidator`
* `CalciteCatalogIngestionDmlTest`
<hr>
This PR has:
- [x] been self-reviewed.
- [x] a release note entry in the PR description.
- [x] added unit tests or modified existing tests to cover new code paths,
ensuring the threshold for [code
coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md)
is met.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]