Skip to content

Commit 1fa25ae

Browse files
wiedldandygrove
authored andcommitted
fix(9870): common expression elimination optimization, should always re-find the correct expression during re-write. (#9871)
* test(9870): reproducer of error with jumping traversal patterns in common-expr-elimination traversals * refactor: remove the IdArray ordered idx, since the idx ordering does not always stay in sync with the updated TreeNode traversal * refactor: use the only reproducible key (expr_identifer) for expr_set, while keeping the (stack-popped) symbol used for alias. * refactor: encapsulate most of the logic within ExprSet, and delineate the expr_identifier from the alias symbol * test(9870): demonstrate that the sqllogictests are now passing
1 parent 799be5e commit 1fa25ae

File tree

3 files changed

+214
-292
lines changed

3 files changed

+214
-292
lines changed

datafusion/expr/src/logical_plan/plan.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2368,7 +2368,7 @@ impl DistinctOn {
23682368

23692369
/// Aggregates its input based on a set of grouping and aggregate
23702370
/// expressions (e.g. SUM).
2371-
#[derive(Clone, PartialEq, Eq, Hash)]
2371+
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
23722372
// mark non_exhaustive to encourage use of try_new/new()
23732373
#[non_exhaustive]
23742374
pub struct Aggregate {

0 commit comments

Comments
 (0)