Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

andygrove
Copy link
Member

@andygrove andygrove commented Oct 5, 2019

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.

@github-actions
Copy link

github-actions bot commented Oct 5, 2019

Copy link
Contributor

@paddyhoran paddyhoran left a 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

Copy link
Contributor

@paddyhoran paddyhoran left a 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),
Copy link
Contributor

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?

Copy link
Member Author

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"
Copy link
Contributor

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(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: supports

Copy link
Contributor

@paddyhoran paddyhoran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andygrove andygrove closed this in d2cbf42 Oct 7, 2019
andygrove added a commit that referenced this pull request Oct 8, 2019
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants