Skip to content

Conversation

@e-dard
Copy link
Contributor

@e-dard e-dard commented May 24, 2021

Which issue does this PR close?

Closes #408

What changes are included in this PR?

This PR ensures that filter expressions already present on the table scan part of a logical plan are not re-added if the plan is run through the optimiser again.

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Looks good to me . Thank you @e-dard

FYI @jorgecarleitao


// Optimizing the same plan multiple times should produce the same plan
// each time.
assert_optimized_plan_eq(&optimised_plan, expected);
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

Choose a reason for hiding this comment

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

+1


// Optimizing the same plan multiple times should produce the same plan
// each time.
assert_optimized_plan_eq(&optimised_plan, expected);
Copy link
Contributor

Choose a reason for hiding this comment

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

+1

@e-dard e-dard force-pushed the er/fix/duplicate_filters branch from a9bfae7 to ffca3de Compare May 24, 2021 13:31
@alamb alamb merged commit 880650d into apache:master May 25, 2021
jimexist pushed a commit to jimexist/arrow-datafusion that referenced this pull request May 26, 2021
@e-dard e-dard deleted the er/fix/duplicate_filters branch May 26, 2021 22:05
@houqp houqp added bug Something isn't working datafusion labels Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimising an already optimised logical plan results in redundant pushed down filters

5 participants