alamb commented on code in PR #24129:
URL: https://github.com/apache/datafusion/pull/24129#discussion_r3729855008
##########
datafusion-examples/examples/data_io/parquet_advanced_index.rs:
##########
@@ -83,7 +83,7 @@ use url::Url;
///
/// Specifically, this example illustrates how to:
/// 1. Use [`ParquetFileReaderFactory`] to avoid re-reading parquet metadata
on each query
-/// 2. Use [`PruningPredicate`] for predicate analysis
+/// 2. Use [`datafusion::physical_optimizer::pruning::PruningPredicate`] for
predicate analysis
Review Comment:
can we avoid adding this full path and make it a normal link? (leave it
`PruningPredicate` and then add a definition for pruning predicate below?
##########
datafusion-examples/examples/data_io/parquet_advanced_index.rs:
##########
@@ -300,8 +300,9 @@ impl IndexTableProvider {
// In this example, we use the PruningPredicate's literal guarantees to
// analyze the predicate. In a real system, using
// `PruningPredicate::prune` would likely be easier to do.
- let pruning_predicate =
- PruningPredicate::try_new(Arc::clone(predicate), self.schema())?;
+ let pruning_predicate = PruningPredicateBuilder::new()
Review Comment:
❤️
##########
datafusion/pruning/src/pruning_predicate.rs:
##########
@@ -483,13 +480,56 @@ impl<'a> PruningPredicateBuilder<'a> {
/// Build a [`PruningPredicate`], returning the construction error
/// directly. Callers that want the always-true predicate elided or
/// errors folded into a counter should use [`Self::build`] instead.
- pub fn try_build(self, predicate: Arc<dyn PhysicalExpr>) ->
Result<PruningPredicate> {
+ pub fn try_build(
+ self,
+ mut predicate: Arc<dyn PhysicalExpr>,
Review Comment:
it is strange this got reformatted -- but clearly nothing you did
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]