You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "FrankChen021 (via GitHub)" <gi...@apache.org> on 2026/10/11 08:31:03 UTC
[PR] refactor: migrate SQL query context parameters (druid)
FrankChen021 opened a new pull request, #20556:
URL: https://github.com/apache/druid/pull/20556
### Description
Follow-up to #20198, stacked on #20555. Until #20555 is merged, this diff also includes its commits; the SQL changes start after `fix: make generator test and checkstyle pass for migrated parameters`.
Migrates the SQL query context parameters documented in `sql-query-context.md` to typed `QueryContextParameter` descriptors.
- Declares descriptors for SQL planner and MSQ parameters in `QueryContextParameters`, grouped by section, including `maxPlanningTimeMs`.
- Adds a `Visibility` level (`PUBLIC`, `HIDDEN`, `INTERNAL`) to descriptors. SQL `SET` rejects `INTERNAL` parameters.
- Requires a description for every descriptor.
- Replaces raw-string reads in `PlannerContext`, `PlannerConfig` and MSQ with descriptor-backed reads, and adds `PlannerConfig.withOverrides(QueryContextParameter, T)`.
- Generates the corresponding rows in `sql-query-context.md` from the descriptors.
Existing parameter names, defaults and behavior are unchanged.
Supersedes FrankChen021/druid#191.
<hr>
This PR has:
- [x] been self-reviewed.
- [x] added documentation for new or modified features or behaviors.
- [x] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
- [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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] refactor: migrate SQL query context parameters (druid)
Posted by "github-advanced-security[bot] (via GitHub)" <gi...@apache.org>.
github-advanced-security[bot] commented on code in PR #20556:
URL: https://github.com/apache/druid/pull/20556#discussion_r4240971260
##########
processing/src/test/java/org/apache/druid/query/context/QueryContextParameterTest.java:
##########
@@ -107,9 +112,10 @@
Integer.class,
value -> {
parserCalled.set(true);
- return QueryContexts.getAsInt("maxThings", value);
+ return Integer.parseInt((String) value);
Review Comment:
## CodeQL / Missing catch of NumberFormatException
Potential uncaught 'java.lang.NumberFormatException'.
[Show more details](https://github.com/apache/druid/security/code-scanning/12076)
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
Re: [PR] refactor: migrate SQL query context parameters (druid)
Posted by "FrankChen021 (via GitHub)" <gi...@apache.org>.
FrankChen021 closed pull request #20556: refactor: migrate SQL query context parameters
URL: https://github.com/apache/druid/pull/20556
--
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: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org