16pierre commented on code in PR #19928:
URL: https://github.com/apache/datafusion/pull/19928#discussion_r2717084128
##########
datafusion/pruning/src/pruning_predicate.rs:
##########
@@ -3229,14 +3267,19 @@ mod tests {
#[test]
fn row_group_predicate_in_list_to_many_values() -> Result<()> {
let schema = Schema::new(vec![Field::new("c1", DataType::Int32,
false)]);
- // test c1 in(1..21)
- // in pruning.rs has MAX_LIST_VALUE_SIZE_REWRITE = 20, more than this
value will be rewrite
- // always true
- let expr = col("c1").in_list((1..=21).map(lit).collect(), false);
+ let limit = 15i32;
+ let expr = col("c1").in_list((1..=limit).map(lit).collect(), false);
let expected_expr = "true";
let predicate_expr =
- test_build_predicate_expression(&expr, &schema, &mut
RequiredColumns::new());
+ test_build_predicate_expression_with_pruning_predicate_config(
Review Comment:
Tried f6624d7fd, happy to add more coverage if necessary. To some degree the
test is testing the formatter logic rather than the internal logic because
`fmt` re-does the predicate pruning logic:
https://github.com/apache/datafusion/blob/118dc6f9d8ebf871dee61f95b7f31c634997728e/datafusion/datasource-parquet/src/source.rs#L650-L667
--
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]