Fix VirtualColumn related issues in window expressions#15119
Merged
abhishekagarwal87 merged 117 commits intoOct 23, 2023
Conversation
imply-cheddar
approved these changes
Oct 23, 2023
| throw DruidException.defensive("Column[%s] not found!", column); | ||
| } | ||
| retVal = racColumn.toAccessor(); | ||
| retVal = racColumn == null ? null : racColumn.toAccessor(); |
Contributor
There was a problem hiding this comment.
Reading this code has made me realize that we need to do a containsKey() check in order to actually take advantage of the cache. I.e. if we cache that it was null, we are going to keep asking and overwriting the cache for that column because we are checking the result of .get() instead of .containsKey().
I'm leaving this comment so that we have a shared understanding, not because I'm asking it to be adjusted in this PR.
abhishekagarwal87
approved these changes
Oct 23, 2023
kgyrtkirk
added a commit
to kgyrtkirk/druid
that referenced
this pull request
Oct 23, 2023
for some exotic queries like:
SELECT
'_'||dim1,
MIN(cast(0 as double)) OVER (),
MIN(cast((cnt||cnt) as bigint)) OVER ()
FROM foo
the compilation have resulted in NPE -s mostly because VirtualColumn -s were not handled properly
(cherry picked from commit b95035f)
abhishekagarwal87
pushed a commit
that referenced
this pull request
Oct 23, 2023
for some exotic queries like:
SELECT
'_'||dim1,
MIN(cast(0 as double)) OVER (),
MIN(cast((cnt||cnt) as bigint)) OVER ()
FROM foo
the compilation have resulted in NPE -s mostly because VirtualColumn -s were not handled properly
(cherry picked from commit b95035f)
CaseyPan
pushed a commit
to CaseyPan/druid
that referenced
this pull request
Nov 17, 2023
for some exotic queries like:
SELECT
'_'||dim1,
MIN(cast(0 as double)) OVER (),
MIN(cast((cnt||cnt) as bigint)) OVER ()
FROM foo
the compilation have resulted in NPE -s mostly because VirtualColumn -s were not handled properly
riovic918data
pushed a commit
to riovic918data/druid
that referenced
this pull request
Jun 12, 2026
for some exotic queries like:
SELECT
'_'||dim1,
MIN(cast(0 as double)) OVER (),
MIN(cast((cnt||cnt) as bigint)) OVER ()
FROM foo
the compilation have resulted in NPE -s mostly because VirtualColumn -s were not handled properly
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.
for some exotic queries like:
the compilation have resulted in
NPE-s mostly becauseVirtualColumn-s were not handled properly