-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix expression column capabilities to not report dictionary encoded unless input is string #16577
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -277,6 +277,9 @@ public ColumnCapabilities inferColumnCapabilities(@Nullable ColumnType outputTyp | |
// until query time | ||
return ColumnCapabilitiesImpl.copyOf(underlyingCapabilities) | ||
.setType(ColumnType.STRING) | ||
// this is sad, but currently dictionary encodedness is tied to string | ||
// selectors and sad stuff happens if the input type isn't string | ||
.setDictionaryEncoded(underlyingCapabilities.is(ValueType.STRING)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't this be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also, imo There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
oops yes.
Ah yea that is reasonable i suppose, i think originally more were preserved than not so i went with the copy. I guess There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. actually, we were explicitly marking hasBitmapIndexes as false, though #15585 allows expressions to use them in many cases, so it probably should be allowed to pass through. |
||
.setDictionaryValuesSorted(false) | ||
.setDictionaryValuesUnique(false) | ||
.setHasBitmapIndexes(false) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just removing unused code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, i had put in the description:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh, I missed that the
capabilitiesBuilder
is frombuilder
itself. OK, this change makes sense then.