adriangb commented on code in PR #19129:
URL: https://github.com/apache/datafusion/pull/19129#discussion_r2599471346
##########
datafusion/pruning/src/pruning_predicate.rs:
##########
@@ -2774,6 +2865,164 @@ mod tests {
Ok(())
}
+ /// Test that non-boolean literal expressions don't prune any containers
and error gracefully by not pruning anything instead of e.g. panicking
+ #[test]
+ fn row_group_predicate_non_boolean() {
+ let schema = Arc::new(Schema::new(vec![Field::new("c1",
DataType::Int32, true)]));
+ let statistics = TestStatistics::new()
+ .with("c1", ContainerStats::new_i32(vec![Some(0)],
vec![Some(10)]));
+ let expected_ret = &[true];
+ prune_with_expr(lit(1), &schema, &statistics, expected_ret);
+ }
Review Comment:
@alamb this is the other test you asked for
--
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]