-
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
Handling nil selector column in vector math processors #16128
Conversation
} else if (inputType.is(ExprType.DOUBLE)) { | ||
processor = doubleOutDoubleInSupplier.get(); | ||
} | ||
if (inputType == null || inputType.is(ExprType.DOUBLE)) { |
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.
nit: use Types.isNullOr(inputType, ExprType.DOUBLE)
, same for other lines
return inspector.areNumeric(args) && inspector.canVectorize(args); | ||
final ExpressionType outputType = args.get(0).getOutputType(inspector); | ||
if (outputType == null && NullHandling.replaceWithDefault()) { | ||
return 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.
worth leaving a comment about why this is the case. something about how non-vectorized treats null values as STRING
types, which makes it kind of complicated to achieve consistent behavior for vector and non-vector engines
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.
added
Description
Currently If a segment does not have a column, then an math expression processor triggered on that segment involving that column is resulting in a
Unable to vectorize expression
exception.This PR aims to fix these by defaulting the input type to double type.
Key changed/added classes in this PR
VectorMathProcessors
Function
VectorExprSanityTest
This PR has: