Planning correctly for order by queries on time which previously thre…#13965
Merged
cheddar merged 4 commits intoapache:masterfrom Apr 4, 2023
Merged
Planning correctly for order by queries on time which previously thre…#13965cheddar merged 4 commits intoapache:masterfrom
cheddar merged 4 commits intoapache:masterfrom
Conversation
…w a planning error
somu-imply
commented
Mar 22, 2023
| ); | ||
| return null; | ||
| } | ||
| if (!dataSource.isConcrete()) { |
Contributor
Author
There was a problem hiding this comment.
This was a change in #12418 that was reverted. Since we are using a table data source and not a query data source now the isConcrete() check is not needed and can be removed
9 tasks
Comment on lines
+7319
to
+7328
| ) : aggregators( | ||
| new LongMaxAggregatorFactory("_a0", "a0"), | ||
| new LongMinAggregatorFactory("_a1", "a0"), | ||
| new LongSumAggregatorFactory("_a2:sum", "a0"), | ||
| new FilteredAggregatorFactory( | ||
| new CountAggregatorFactory("_a2:count"), | ||
| not(selector("a0", null, null)) | ||
| ), | ||
| new LongMaxAggregatorFactory("_a3", "d0"), | ||
| new CountAggregatorFactory("_a4") |
Contributor
There was a problem hiding this comment.
Why does this change generate this adjustment to the plan?
Contributor
Author
There was a problem hiding this comment.
No clue but in the case of the useDefault=false it uses the same thing but with a check of not null so thought it was kind of correct
cheddar
approved these changes
Apr 4, 2023
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.
Queries such as the one below fail with Cannot convert query parts into an actual query in and post 2022.05 Druid versions.
SELECT __time,channel FROM wikipedia
WHERE
(
cityName is not null
and channel in
(
SELECT channel FROM wikipedia
))
ORDER BY __time DESC
This bug comes from regression on #12418 should also fix the issue reported in #13163 and also modifies #13173
This PR has: