alamb commented on code in PR #21208:
URL: https://github.com/apache/datafusion/pull/21208#discussion_r3011447001
##########
datafusion/optimizer/src/decorrelate.rs:
##########
@@ -461,19 +461,30 @@ fn collect_local_correlated_cols(
}
fn remove_duplicated_filter(filters: Vec<Expr>, in_predicate: &Expr) ->
Vec<Expr> {
+ // We assume below that swapping the order of operands to an operator does
+ // not change behavior, which is true only if the operator is commutative.
+ debug_assert!(
Review Comment:
it might be nicer here to use an internal error which is somewhat nicer to
handle for other libraries (they can handle the error and return something
nicer)-- there is even a macro for that :
https://docs.rs/datafusion/latest/datafusion/common/macro.assert_or_internal_err.html
--
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]