Skip to content

Commit

Permalink
not neccessary to do anymore
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Taylor <andres@planetscale.com>
  • Loading branch information
systay committed Nov 27, 2020
1 parent 3f9e8aa commit 8a71b7c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions go/vt/sqlparser/expression_rewriting.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,7 @@ func (er *expressionRewriter) funcRewrite(cursor *Cursor, node *FuncExpr) {

func (er *expressionRewriter) unnestSubQueries(cursor *Cursor, subquery *Subquery) {
sel, isSimpleSelect := subquery.Select.(*Select)
// Today, subqueries and derived tables use the same AST struct,
// so we have to check what the parent is so we don't accidentally
// rewrite a FROM clause instead of an expression
_, isDerivedTable := cursor.Parent().(*AliasedTableExpr)

if isDerivedTable || !isSimpleSelect {
if !isSimpleSelect {
return
}

Expand Down

0 comments on commit 8a71b7c

Please sign in to comment.