Skip to content

Conversation

adriangb
Copy link
Contributor

@adriangb adriangb commented Apr 23, 2025

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
Contributor Author

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 adriangb force-pushed the column-orders-parquet-stats branch from 3e15afe to 8c2ceb1 Compare April 23, 2025 06:27
@etseidl
Copy link
Contributor

etseidl commented Apr 25, 2025

@adriangb please check out pydantic#28

@github-actions github-actions bot 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
@alamb alamb mentioned this pull request May 11, 2025
24 tasks
@alamb alamb mentioned this pull request May 19, 2025
18 tasks
@github-actions github-actions bot 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
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.

@alamb alamb mentioned this pull request May 27, 2025
11 tasks
@adriangb
Copy link
Contributor Author

@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
Contributor

etseidl commented Jul 20, 2025

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

alamb commented Sep 5, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate datasource Changes to the datasource crate optimizer Optimizer rules sqllogictest SQL Logic Tests (.slt)

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