niebayes opened a new issue, #23272:
URL: https://github.com/apache/datafusion/issues/23272
### Describe the bug
For a `PartitionedFile` with constant columns, min(col) = max(col),
`FilePruner` fails to prune the file.
```
constant_columns_from_stats()
└─ detects sid min==max==5 → literal_columns = {"sid": 5}
└─ replace_columns_with_literals()
└─ sid > 100 → 5 > 100 ← column reference replaced by
literal
└─ FilePruner::try_new(5 > 100, schema, file)
└─ should_prune()
└─ build_pruning_predicate(5 > 100, schema) → None ←
constant expression yields no statistics-based predicate
└─ return Ok(false) ←
file not pruned
```
### To Reproduce
_No response_
### Expected behavior
Correctly prune.
### Additional context
_No response_
--
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]