Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Taylor <[email protected]>
  • Loading branch information
systay committed Aug 15, 2024
1 parent 131b98d commit 4451af6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions go/vt/vtgate/planbuilder/operators/projection_pushing.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,10 @@ func splitUnexploredExpression(
case col.IsPureRight():
rhs.add(pe, alias)
col.RHSExpr = colName
case col.IsMixedLeftAndRight():
default:
for _, lhsExpr := range col.LHSExprs {
ae := aeWrap(lhsExpr.Expr)
columnName := ae.ColumnName()
ae.As = sqlparser.NewIdentifierCI(columnName)
lhs.add(newProjExpr(ae), columnName)
}
innerPE := newProjExprWithInner(pe.Original, col.RHSExpr)
Expand Down
4 changes: 2 additions & 2 deletions go/vt/vtgate/planbuilder/testdata/from_cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -4802,8 +4802,8 @@
"Name": "user",
"Sharded": true
},
"FieldQuery": "select dt.foo from (select u.foo as foo from `user` as u where 1 != 1) as dt where 1 != 1",
"Query": "select dt.foo from (select u.foo as foo from `user` as u) as dt",
"FieldQuery": "select dt.foo from (select u.foo from `user` as u where 1 != 1) as dt where 1 != 1",
"Query": "select dt.foo from (select u.foo from `user` as u) as dt",
"Table": "`user`"
},
{
Expand Down
4 changes: 2 additions & 2 deletions go/vt/vtgate/planbuilder/testdata/tpch_cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -1190,8 +1190,8 @@
"Name": "main",
"Sharded": true
},
"FieldQuery": "select profit.l_extendedprice, profit.l_discount, profit.l_quantity, profit.l_suppkey, profit.l_partkey, weight_string(profit.l_suppkey) from (select l_extendedprice as l_extendedprice, l_discount as l_discount, l_quantity as l_quantity, l_suppkey as l_suppkey, l_partkey as l_partkey from lineitem where 1 != 1) as profit where 1 != 1",
"Query": "select profit.l_extendedprice, profit.l_discount, profit.l_quantity, profit.l_suppkey, profit.l_partkey, weight_string(profit.l_suppkey) from (select l_extendedprice as l_extendedprice, l_discount as l_discount, l_quantity as l_quantity, l_suppkey as l_suppkey, l_partkey as l_partkey from lineitem where l_orderkey = :o_orderkey) as profit",
"FieldQuery": "select profit.l_extendedprice, profit.l_discount, profit.l_quantity, profit.l_suppkey, profit.l_partkey, weight_string(profit.l_suppkey) from (select l_extendedprice, l_discount, l_quantity, l_suppkey as l_suppkey, l_partkey as l_partkey from lineitem where 1 != 1) as profit where 1 != 1",
"Query": "select profit.l_extendedprice, profit.l_discount, profit.l_quantity, profit.l_suppkey, profit.l_partkey, weight_string(profit.l_suppkey) from (select l_extendedprice, l_discount, l_quantity, l_suppkey as l_suppkey, l_partkey as l_partkey from lineitem where l_orderkey = :o_orderkey) as profit",
"Table": "lineitem"
}
]
Expand Down

0 comments on commit 4451af6

Please sign in to comment.