fix issue with boolean expression input#12429
Merged
clintropolis merged 2 commits intoapache:masterfrom Apr 13, 2022
Merged
Conversation
jihoonson
reviewed
Apr 12, 2022
Contributor
jihoonson
left a comment
There was a problem hiding this comment.
LGTM overall. One question is, what should ofType do when type is DOUBLE and value is a boolean? Even though it doesn't seem to be able to happen today, I think it would be nicer if the ofType method is more complete and handles every case. I guess the method should either fail or handles the input properly.
jihoonson
approved these changes
Apr 13, 2022
Contributor
jihoonson
left a comment
There was a problem hiding this comment.
LGTM. Thanks @clintropolis.
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.
Description
Fixes a regression caused by #11853 when processing boolean typed inputs for transformation expressions at ingestion time, such as from JSON and other input formats which support them. The changes to how expression types were resolved to make room for
COMPLEX, resulted in expression input that is of theBooleanjava type ending up asCOMPLEXdruid type. Now, if these values will be correctly converted to eitherSTRINGorLONGdruid types, ifdruid.expressions.useStrictBooleans=true.This PR has: