Amogh-2404 commented on code in PR #24668:
URL: https://github.com/apache/datafusion/pull/24668#discussion_r3868729552
##########
datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs:
##########
@@ -1411,11 +1339,6 @@ impl TreeNodeRewriter for Simplifier<'_> {
//
Expr::Not(inner) => Transformed::yes(negate_clause(*inner)),
- //
- // Rules for Negative
- //
- Expr::Negative(inner) =>
Transformed::yes(distribute_negation(*inner)),
Review Comment:
Thanks — this was the shared tie-group inference gap in
`EquivalenceProperties`, rather than separate Aggregate and Window issues.
A satisfied deterministic `-(-x)` now also pins `x` within that key's ties,
and `find_longest_permutation` uses the same satisfied-key path as the other
ordering checks. I also carry that relationship through projections that
actually evaluate the retained expression, so projected and aggregate aliases
preserve the suffix ordering.
The Aggregate and Window expressions themselves remain unchanged, so checked
negation is still executed. Timestamp `MIN` continues to report
`ArithmeticOverflow`.
The regressions use the exact two-batch-then-pending unbounded source for
`GROUP BY` and `LEAD`, covering `TimestampNanosecond`, nullable timestamps, and
`IntervalYearMonth`, plus projection composition and aggregate/window overflow
controls. Full all-feature Clippy and the extended workspace suite pass on
`a9279fc37`.
--
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]