MSQ: Add QueryKitSpec to encapsulate QueryKit params.#17077
Merged
gianm merged 4 commits intoapache:masterfrom Sep 17, 2024
Merged
MSQ: Add QueryKitSpec to encapsulate QueryKit params.#17077gianm merged 4 commits intoapache:masterfrom
gianm merged 4 commits intoapache:masterfrom
Conversation
This patch introduces QueryKitSpec, an object that encapsulates the parameters to makeQueryDefinition that are consistent from call to call. This simplifies things because we avoid passing around all the components individually. This patch also splits "maxWorkerCount" into "maxLeafWorkerCount" and "maxNonLeafWorkerCount", which apply to leaf stages (no other stages as inputs) and nonleaf stages respectively. Finally, this patch also rovides a way for ControllerContext to supply a QueryKitSpec to its liking. It is expected that this will be used by controllers of quick interactive queries to set maxNonLeafWorkerCount = 1, which will generate fanning-in query plans.
| QueryKit<Query<?>> queryKit, | ||
| String queryId, | ||
| MSQSpec querySpec, | ||
| ControllerQueryKernelConfig queryKernelConfig |
Check notice
Code scanning / CodeQL
Useless parameter
| private final int targetPartitionsPerWorker; | ||
|
|
||
| /** | ||
| * @param queryKit kit that is used to translate native subqueries; i.e., |
Contributor
There was a problem hiding this comment.
incomplete comment?
| /** | ||
| * @param queryKit kit that is used to translate native subqueries; i.e., | ||
| * @param queryId queryId of the resulting {@link QueryDefinition} | ||
| * {@link org.apache.druid.query.QueryDataSource}. Typically a {@link MultiQueryKit}. |
Contributor
There was a problem hiding this comment.
the description needs to be moved above.
clintropolis
approved these changes
Sep 17, 2024
pranavbhole
pushed a commit
to pranavbhole/druid
that referenced
this pull request
Sep 17, 2024
* MSQ: Add QueryKitSpec to encapsulate QueryKit params. This patch introduces QueryKitSpec, an object that encapsulates the parameters to makeQueryDefinition that are consistent from call to call. This simplifies things because we avoid passing around all the components individually. This patch also splits "maxWorkerCount" into "maxLeafWorkerCount" and "maxNonLeafWorkerCount", which apply to leaf stages (no other stages as inputs) and nonleaf stages respectively. Finally, this patch also rovides a way for ControllerContext to supply a QueryKitSpec to its liking. It is expected that this will be used by controllers of quick interactive queries to set maxNonLeafWorkerCount = 1, which will generate fanning-in query plans. * Fix javadoc.
kfaraz
pushed a commit
to kfaraz/druid
that referenced
this pull request
Oct 4, 2024
* MSQ: Add QueryKitSpec to encapsulate QueryKit params. This patch introduces QueryKitSpec, an object that encapsulates the parameters to makeQueryDefinition that are consistent from call to call. This simplifies things because we avoid passing around all the components individually. This patch also splits "maxWorkerCount" into "maxLeafWorkerCount" and "maxNonLeafWorkerCount", which apply to leaf stages (no other stages as inputs) and nonleaf stages respectively. Finally, this patch also rovides a way for ControllerContext to supply a QueryKitSpec to its liking. It is expected that this will be used by controllers of quick interactive queries to set maxNonLeafWorkerCount = 1, which will generate fanning-in query plans. * Fix javadoc.
kfaraz
added a commit
that referenced
this pull request
Oct 4, 2024
…) (#17074) (#17076) (#17077) (#17193) (#17243) Backport the following patches for a clean backport of Dart changes 1. Add "targetPartitionsPerWorker" setting for MSQ. (#17048) 2. MSQ: Improved worker cancellation. (#17046) 3. Add "includeAllCounters()" to WorkerContext. (#17047) 4. MSQ: Include worker context maps in WorkOrders. (#17076) 5. TableInputSpecSlicer changes to support running on Brokers. (#17074) 6. Fix call to MemoryIntrospector in IndexerControllerContext. (#17066) 7. MSQ: Add QueryKitSpec to encapsulate QueryKit params. (#17077) 8. MSQ: Use task context flag useConcurrentLocks to determine task lock type (#17193)
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.
This patch introduces QueryKitSpec, an object that encapsulates the parameters to makeQueryDefinition that are consistent from call to call. This simplifies things because we avoid passing around all the components individually.
This patch also splits "maxWorkerCount" into "maxLeafWorkerCount" and "maxNonLeafWorkerCount", which apply to leaf stages (no other stages as inputs) and nonleaf stages respectively.
Finally, this patch also provides a way for ControllerContext to supply a QueryKitSpec to its liking. It is expected that this will be used by controllers of quick interactive queries to set maxNonLeafWorkerCount = 1, which will generate fanning-in query plans.
Marked draft since this will not run properly until #17076 is merged. Without that patch, this one ends up using#17076 is merged nowqueryKernelConfigprior to its initialization.