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

[Kernel] Push predicate on partition values to checkpoint reader in state reconstruction #2872

Merged
merged 8 commits into from
Apr 10, 2024

Conversation

vkorukanti
Copy link
Collaborator

@vkorukanti vkorukanti commented Apr 9, 2024

Description

Converts the partition predicate into a filter on add.partitionValues_parsed.<partitionPhysicalColName>. This predicate is pushed to the Parquet reader when reading the checkpoint files during the state reconstruction. This helps prune reading checkpoint files that can't possibly have any scan files satisfying the given partition predicate.

This can be extended in future to even support pushdown of predicate on data columns as well.

How was this patch tested?

Unittests

@vkorukanti vkorukanti changed the title Checkpoint predicate pushdown [Kernel] Push predicate on partition values to checkpoint reader in state reconstruction Apr 9, 2024
@vkorukanti vkorukanti added this to the 3.2.0 milestone Apr 9, 2024
* checkpoint files.
*
* @param predicate Predicate on partition columns.
* @param partitionColMetadata Map of partition column name (in lower case) to its type.
Copy link
Collaborator

Choose a reason for hiding this comment

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

to its type --> do we only need the type? like DataType? Or do we need the entire structfield?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I see we want the StructField. Could we replace to its type with to its StructField?

Copy link
Collaborator

@scottsand-db scottsand-db left a comment

Choose a reason for hiding this comment

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

LGTM! Two minor comments

@vkorukanti vkorukanti merged commit 3dcbbb8 into delta-io:master Apr 10, 2024
7 checks passed
andreaschat-db pushed a commit to andreaschat-db/delta that referenced this pull request Apr 16, 2024
…tate reconstruction (delta-io#2872)

## Description

Converts the partition predicate into a filter on
`add.partitionValues_parsed.<partitionPhysicalColName>`. This predicate
is pushed to the Parquet reader when reading the checkpoint files during
the state reconstruction. This helps prune reading checkpoint files that
can't possibly have any scan files satisfying the given partition
predicate.

This can be extended in future to even support pushdown of predicate on
data columns as well.

## How was this patch tested?
Unittests
@vkorukanti vkorukanti deleted the checkpointPredicatePushdown branch May 9, 2024 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants