You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement Display for Expr, improve operator display (apache#971)
* # This is a combination of 3 commits.
# This is the 1st commit message:
Add Display for Expr::BinaryExpr
# This is the commit message #2:
Update logical_plan/operators tests
# This is the commit message #3:
rebase and debug display for non binary expr
* Add Display for Expr::BinaryExpr
Update logical_plan/operators tests
rebase and debug display for non binary expr
Add Display for Expr::BinaryExpr
Update logical_plan/operators tests
Updating tests
Update aggregate display
Updating tests without aggregate
More tests
Working on agg/scalar functions
Fix binary_expr in create_name function and attendant tests
More tests
More tests
Doc tests
Rebase and update new tests
* Submodule update
* Restore submodule references from master
Co-authored-by: Andrew Lamb <[email protected]>
Copy file name to clipboardExpand all lines: datafusion/src/optimizer/common_subexpr_eliminate.rs
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -714,8 +714,8 @@ mod test {
714
714
)?
715
715
.build()?;
716
716
717
-
let expected = "Aggregate: groupBy=[[]], aggr=[[SUM(#BinaryExpr-*BinaryExpr--Column-test.bLiteral1Column-test.a AS test.a Multiply Int32(1) Minus test.b), SUM(#BinaryExpr-*BinaryExpr--Column-test.bLiteral1Column-test.a AS test.a Multiply Int32(1) Minus test.b Multiply Int32(1) Plus #test.c)]]\
718
-
\n Projection: #test.a Multiply Int32(1) Minus #test.b AS BinaryExpr-*BinaryExpr--Column-test.bLiteral1Column-test.a, #test.a, #test.b, #test.c\
717
+
let expected = "Aggregate: groupBy=[[]], aggr=[[SUM(#BinaryExpr-*BinaryExpr--Column-test.bLiteral1Column-test.a AS test.a * Int32(1) - test.b), SUM(#BinaryExpr-*BinaryExpr--Column-test.bLiteral1Column-test.a AS test.a * Int32(1) - test.b * Int32(1) + #test.c)]]\
let expected = "Aggregate: groupBy=[[]], aggr=[[Int32(1) Plus #AggregateFunction-AVGfalseColumn-test.a AS AVG(test.a), Int32(1) Minus #AggregateFunction-AVGfalseColumn-test.a AS AVG(test.a)]]\
740
+
let expected = "Aggregate: groupBy=[[]], aggr=[[Int32(1) + #AggregateFunction-AVGfalseColumn-test.a AS AVG(test.a), Int32(1) - #AggregateFunction-AVGfalseColumn-test.a AS AVG(test.a)]]\
741
741
\n Projection: AVG(#test.a) AS AggregateFunction-AVGfalseColumn-test.a, #test.a, #test.b, #test.c\
742
742
\n TableScan: test projection=None";
743
743
@@ -757,8 +757,8 @@ mod test {
757
757
])?
758
758
.build()?;
759
759
760
-
let expected = "Projection: #BinaryExpr-+Column-test.aLiteral1 AS Int32(1) Plus test.a AS first, #BinaryExpr-+Column-test.aLiteral1 AS Int32(1) Plus test.a AS second\
761
-
\n Projection: Int32(1) Plus #test.a AS BinaryExpr-+Column-test.aLiteral1, #test.a, #test.b, #test.c\
760
+
let expected = "Projection: #BinaryExpr-+Column-test.aLiteral1 AS Int32(1) + test.a AS first, #BinaryExpr-+Column-test.aLiteral1 AS Int32(1) + test.a AS second\
761
+
\n Projection: Int32(1) + #test.a AS BinaryExpr-+Column-test.aLiteral1, #test.a, #test.b, #test.c\
762
762
\n TableScan: test projection=None";
763
763
764
764
assert_optimized_plan_eq(&plan, expected);
@@ -777,7 +777,7 @@ mod test {
777
777
])?
778
778
.build()?;
779
779
780
-
let expected = "Projection: Int32(1) Plus #test.a, #test.a Plus Int32(1)\
780
+
let expected = "Projection: Int32(1) + #test.a, #test.a + Int32(1)\
0 commit comments