Skip to content

Commit

Permalink
Fix and improve CommonSubexprEliminate rule (#10396)
Browse files Browse the repository at this point in the history
* Revert "fix(9870): common expression elimination optimization, should always re-find the correct expression during re-write. (#9871)"

This reverts commit cd7a00b.

* expr id should always contain the full expr structure, cleaner expr ids, better JumpMark handling, better variable names, code cleanup, some new todos

* move `Expr` from `expr_set`s to `affected_id`s

* better naming, docs fixes

* introduce `CommonExprs` type alias, minor todo fix

* add test

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
  • Loading branch information
peter-toth and alamb authored May 8, 2024
1 parent 7df085e commit 0d283a4
Show file tree
Hide file tree
Showing 7 changed files with 500 additions and 385 deletions.
2 changes: 1 addition & 1 deletion datafusion/expr/src/logical_plan/plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2245,7 +2245,7 @@ impl DistinctOn {

/// Aggregates its input based on a set of grouping and aggregate
/// expressions (e.g. SUM).
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
#[derive(Clone, PartialEq, Eq, Hash)]
// mark non_exhaustive to encourage use of try_new/new()
#[non_exhaustive]
pub struct Aggregate {
Expand Down
Loading

0 comments on commit 0d283a4

Please sign in to comment.