Skip to content

pipe column orderings into pruning predicate creation - #15821

Closed
adriangb wants to merge 23 commits into
apache:mainfrom
pydantic:column-orders-parquet-stats
Closed

pipe column orderings into pruning predicate creation#15821
adriangb wants to merge 23 commits into
apache:mainfrom
pydantic:column-orders-parquet-stats

Conversation

@adriangb

@adriangbadriangb commented Apr 23, 2025

Copy link
Copy Markdown
Contributor

Comment on lines +303 to +307
let pruning_predicate = PruningPredicate::try_new(
Arc::clone(predicate),
self.schema(),
vec![ColumnOrdering::Unknown; self.schema().fields().len()],
)?;

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

We could add a new signature to avoid API churn, but I wanted to make it explicit for now to see all of the callsites

@adriangb
adriangbforce-pushed the column-orders-parquet-stats branch from 3e15afe to 8c2ceb1CompareApril 23, 2025 06:27
@etseidl

Copy link
Copy Markdown
Contributor

@adriangb please check out pydantic#28

@github-actionsgithub-actionsBot added the core Core DataFusion crate label Apr 28, 2025
@adriangb
adriangb marked this pull request as ready for review April 28, 2025 19:39
@alambalamb mentioned this pull request May 11, 2025
24 tasks
@alambalamb mentioned this pull request May 19, 2025
18 tasks
@github-actionsgithub-actionsBot added the sqllogictest SQL Logic Tests (.slt) label May 20, 2025
return expr;
}

// Special handlng for floats. Because current Parquet statistics do not allow NaN, and

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This block is why we need to get the column ordering info passed down. Here we know which column is being pruned and with which operation. For floats we can disallow pruning because the Parquet stats are incomplete. We can also skip pruning if the stats are not valid because an ordering is not defined for the type.

@alambalamb mentioned this pull request May 27, 2025
11 tasks
@adriangb

Copy link
Copy Markdown
ContributorAuthor

@etseidl I'm sorry we haven't made any progress here. I see there are a lot of merge conflicts but we do now finally have all of the building blocks in place since we evaluate predicates against the physical file schema. Should we revive this?

@etseidl

Copy link
Copy Markdown
Contributor

I'll be able to revisit this early in the week. It's been a back burner issue for me lately because of the slow progress on parquet format changes. It seems the sort order keeps popping up, though, so I think we'll want this change eventually.

@alamb

alamb commented Sep 5, 2025

Copy link
Copy Markdown
Contributor

marking as draft as this doesn't appear to be waiting on review

@github-actions

Copy link
Copy Markdown

Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days.

@github-actionsgithub-actionsBot added the Stale PR has not had any activity for some time label Nov 5, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

coreCore DataFusion cratedatasourceChanges to the datasource crateoptimizerOptimizer rulessqllogictestSQL Logic Tests (.slt)StalePR has not had any activity for some time

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pruning of floating point Parquet columns is incorrect when NaN is present

3 participants

@adriangb@etseidl@alamb