Skip to content

Commit

Permalink
update test assertions
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Taylor <[email protected]>
  • Loading branch information
systay committed Oct 14, 2021
1 parent 4090a69 commit c0d1609
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
4 changes: 1 addition & 3 deletions go/vt/vtgate/planbuilder/abstract/operator_test_data.txt
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,7 @@ SubQuery: {
}]
Outer: QueryGraph: {
Tables:
TableSet{0}:`user` AS u
JoinPredicates:
TableSet{0,1} - u.id = (select id from user_extra where id = u.id)
TableSet{0}:`user` AS u where u.id = (select id from user_extra where id = u.id)
}
}

Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtgate/planbuilder/rewrite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func TestHavingRewrite(t *testing.T) {
assert.Equal(t, len(tcase.sqs), len(squeries), "number of subqueries not matched")
}
for _, sq := range squeries {
assert.Equal(t, tcase.sqs[sq.ArgName], sqlparser.String(sq.Subquery))
assert.Equal(t, tcase.sqs[sq.ArgName], sqlparser.String(sq.Subquery.Select))
}
})
}
Expand Down
15 changes: 8 additions & 7 deletions go/vt/vtgate/semantics/analyzer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ var T0 TableSet

var (
// Just here to make outputs more readable
T1 = SingleTableSet(0)
T2 = SingleTableSet(1)
T3 = SingleTableSet(2)
T4 = SingleTableSet(3)
T5 = SingleTableSet(4)
None = EmptyTableSet()
T1 = SingleTableSet(0)
T2 = SingleTableSet(1)
T3 = SingleTableSet(2)
T4 = SingleTableSet(3)
T5 = SingleTableSet(4)
)

func extract(in *sqlparser.Select, idx int) sqlparser.Expr {
Expand Down Expand Up @@ -488,10 +489,10 @@ func TestScopeForSubqueries(t *testing.T) {
deps: T2,
}, {
sql: `select t.col1, (select (select y.col2 from y) from z) from x as t`,
deps: T3,
deps: None,
}, {
sql: `select t.col1, (select (select (select (select w.col2 from w) from x) from y) from z) from x as t`,
deps: T5,
deps: None,
}, {
sql: `select t.col1, (select id from t) from x as t`,
deps: T2,
Expand Down

0 comments on commit c0d1609

Please sign in to comment.