-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Improve case
expr constant handling for when <scalar>
#14159
Conversation
} | ||
} | ||
} else { |
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 not actually possible as the previous version of the code expands out a constant to an array
ColumnarValue::Array(when_expr_value.into_array(batch.num_rows())?)
ColumnarValue::Scalar(_) => { | ||
ColumnarValue::Array(when_expr_value.into_array(batch.num_rows())?) |
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 line has the effect of creating an array out of a scalar -- I remove that and added the special case handling for the values
case
expr constant handlingcase
expr constant handling for when <scalar>
LGTM |
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.
👍🏻
Draft as it builds on #14156Which issue does this PR close?
Rationale for this change
While reviewing #14156 I noticed that the code unecessairly expanded a constant to an array, and that I could update it avoid having any internal errors
What changes are included in this PR?
Are these changes tested?
yes, with new slt tests
Are there any user-facing changes?