alamb commented on code in PR #8441:
URL: https://github.com/apache/arrow-datafusion/pull/8441#discussion_r1435588286


##########
datafusion/core/src/physical_optimizer/pruning.rs:
##########
@@ -2004,100 +2004,97 @@ mod tests {
             DataType::Decimal128(9, 2),
             true,
         )]));
-        // s1 > 5
-        let expr = col("s1").gt(lit(ScalarValue::Decimal128(Some(500), 9, 2)));
-        let expr = logical2physical(&expr, &schema);
-        // If the data is written by spark, the physical data type is INT32 in 
the parquet
-        // So we use the INT32 type of statistic.
-        let statistics = TestStatistics::new().with(
-            "s1",
-            ContainerStats::new_i32(
-                vec![Some(0), Some(4), None, Some(3)], // min
-                vec![Some(5), Some(6), Some(4), None], // max
+
+        prune_with_expr(

Review Comment:
   The idea is to reduce the boiler plate required to setup the test / prune 
the expression, and simply list the data and expected results. It may not be 
many less lines, but the logic is significantly less dense in my opinion



-- 
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]

Reply via email to