Add join-related DataSource types and analysis functionality. #9234
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.
Builds on #9111 and implements the datasource analysis mentioned in #8728. Still can't
handle join datasources, but we're a step closer.
Join-related DataSource types:
in the future for query rewriting (e.g. inlining of subqueries).
DataSource analysis functionality:
outer queries, a base datasource (left-most of the highest level left-leaning join
tree), and other joined-in leaf datasources (the right-hand branches of the
left-leaning join tree).
support analysis.
various ad-hoc approaches. Most of the interesting changes are in
ClientQuerySegmentWalker (brokers), ServerManager (historicals), and
SinkQuerySegmentWalker (indexing tasks).
Other notes:
the analysis changes cleaner to implement.
Also, made it a Set, so implementations don't need to worry about duplicates.
determine whether it is safe to pass a subquery dataSource to the query toolchest.
Fixes an issue introduced in Implement force push down for nested group by query #5471 where subqueries under non-groupBy-typed queries
were silently ignored, since neither the query entry point nor the toolchest did
anything special with them.
returns false for cacheability.