emanuele-em commented on code in PR #26375:
URL: https://github.com/apache/datafusion/pull/26375#discussion_r4292323091
##########
datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs:
##########
@@ -4152,11 +4144,22 @@ mod tests {
assert_eq!(col("c2").get_type(&schema).unwrap(), DataType::Boolean);
- // c2 != true -> !c2
- assert_eq!(simplify(col("c2").not_eq(lit(true))), col("c2").not(),);
-
- // c2 != false -> c2
- assert_eq!(simplify(col("c2").not_eq(lit(false))), col("c2"),);
+ for name in ["c2", "c2_non_null"] {
Review Comment:
I added `c2_non_null` to check that the refactor preserves the same
simplifications for non-nullable columns as for nullable `c2`. This adds
coverage and it does not change the expected behavior. I can keep the original
assertions and add that coverage separately to make the refactor easier to
review if you prefer
--
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]