appletreeisyellow commented on code in PR #13795:
URL: https://github.com/apache/datafusion/pull/13795#discussion_r1893215702


##########
datafusion/physical-optimizer/src/pruning.rs:
##########
@@ -1618,33 +1618,29 @@ fn build_statistics_expr(
 /// will become
 ///
 /// ```sql
-/// CASE
-///  WHEN x_null_count = x_row_count THEN false
-///  ELSE x_min <= 10 AND 10 <= x_max
-/// END
+/// NOT (x_null_count = x_row_count) AND (x_min <= 10 AND 10 <= x_max)
 /// ````
 ///
 /// If the column is known to be all nulls, then the expression
 /// `x_null_count = x_row_count` will be true, which will cause the
-/// case expression to return false. Therefore, prune out the container.
-fn wrap_case_expr(
+/// boolean expression to return false. Therefore, prune out the container.
+fn wrap_null_count_check_expr(
     statistics_expr: Arc<dyn PhysicalExpr>,
     expr_builder: &mut PruningExpressionBuilder,
 ) -> Result<Arc<dyn PhysicalExpr>> {
     // x_null_count = x_row_count

Review Comment:
   ```suggestion
       // x_null_count != x_row_count
   ```



##########
datafusion/physical-optimizer/src/pruning.rs:
##########
@@ -1618,33 +1618,29 @@ fn build_statistics_expr(
 /// will become
 ///
 /// ```sql
-/// CASE
-///  WHEN x_null_count = x_row_count THEN false
-///  ELSE x_min <= 10 AND 10 <= x_max
-/// END
+/// NOT (x_null_count = x_row_count) AND (x_min <= 10 AND 10 <= x_max)

Review Comment:
   ```suggestion
   /// x_null_count != x_row_count AND (x_min <= 10 AND 10 <= x_max)
   ```



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to