-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
ARROW-6694: [Rust] [DataFusion] Integration tests now use physical query plan #5582
Conversation
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.
Just, one change I think. Thanks @andygrove
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.
Didn't actually add the comments :)
match expr { | ||
&Expr::Literal(ref scalar_value) => { | ||
let limit: usize = match scalar_value { | ||
ScalarValue::Int8(x) => Ok(*x as usize), |
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.
I think you need check that the signed integers are positive, right?
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.
Nice catch! ... this was copied over from the existing (soon to be legacy) query execution logic ... now fixed. Also used a more appropriate variable name than x
and fixed the error messages.
ScalarValue::UInt32(x) => Ok(*x as usize), | ||
ScalarValue::UInt64(x) => Ok(*x as usize), | ||
_ => Err(ExecutionError::ExecutionError( | ||
"Limit only support positive integer literals" |
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: supports
))) | ||
} | ||
_ => Err(ExecutionError::ExecutionError( | ||
"Limit only support positive integer literals".to_string(), |
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: supports
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.
LGTM
…cal plan As discussed in the mailing list, this PR removes the legacy code that executed queries directly from the LogicalPlan. This code is not needed now that the new query execution code based on a physical query plan has reached feature parity. We should merge #5582 first, and rebase. Closes #5583 from andygrove/ARROW-6695 and squashes the following commits: 6105ea9 <Andy Grove> Rebase 195ed76 <Andy Grove> Remove legacy relations 8a7a0d2 <Andy Grove> Remove legacy code that executed queries directly from a logical plan Authored-by: Andy Grove <andygrove73@gmail.com> Signed-off-by: Andy Grove <andygrove73@gmail.com>
Integration tests now use physical query plan instead of executing directly from the logical plan.
As part of this PR I added the mapping from logical to physical plan for LIMIT which I somehow missed when creating the PR for the LIMIT physical plan.