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

Fix 2 bugs related to push down partition filters #12902

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

eejbyfeldt
Copy link
Contributor

@eejbyfeldt eejbyfeldt commented Oct 13, 2024

Which issue does this PR close?

Closes #12901.

Rationale for this change

This patch fixes 2 bugs. Errors in partition filters are ignored and
that we allow partition filters to be pushed down for unpartitioned tables,
but we never evaluate such filters. This leads to correctness issues
in both cases.

What changes are included in this PR?

The first bug is fixed by reporting errors for partition filters and only evaluating the filters we allowed as partition filters in supports_filters_pushdown.

The second bug is fixed by only allowing partition filters to be pushed down when we have partition columns. Because we currently just ignore the filters in that case.

Are these changes tested?

Yes, using new and existing tests.

Are there any user-facing changes?

No.

@github-actions github-actions bot added core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels Oct 13, 2024
This patch fixes 2 bugs. Errors in partition filters are ignored and
that we allow partitions filters be push down for unpartition tables
but we never evaluate such filters.

The first bug is fixed by reporting errors for partition filters and
only evaluating the filters we allowed as partition filters in
`supports_filters_pushdown`.

The second bug is fixed by only allowing partition filters to be pushed
down when we have partition columns.
@eejbyfeldt eejbyfeldt force-pushed the 12901-report-failures-in-partition-filters branch from 2d14277 to 708ef2f Compare October 13, 2024 08:56
@eejbyfeldt eejbyfeldt marked this pull request as ready for review October 13, 2024 13:01
@eejbyfeldt eejbyfeldt changed the title Report errors in partition filters Fix 2 bugs related to push down partition filters Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Errors in partition pruning filters are ignored
1 participant