mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-10 00:39:44 -06:00
Added an additional test join query
This commit is contained in:
@@ -1120,6 +1120,19 @@ var JoinTests = []SelectTest{
|
||||
ExpectedSchema: NewResultSetSchema("eid", types.IntKind, "p.id", types.IntKind,
|
||||
"ename", types.StringKind, "pfirst", types.StringKind, "last", types.StringKind),
|
||||
},
|
||||
{
|
||||
Name: "Join from table with two key columns to table with one key column",
|
||||
Query: "select a.episode_id as aid, p.id as pid, p.first from appearances a join people p on a.character_id = p.id order by 1",
|
||||
ExpectedRows: Rs(
|
||||
NewResultSetRow(types.Int(0), types.Int(0), types.String("Homer")),
|
||||
NewResultSetRow(types.Int(1), types.Int(1), types.String("Marge")),
|
||||
NewResultSetRow(types.Int(2), types.Int(2), types.String("Bart")),
|
||||
NewResultSetRow(types.Int(3), types.Int(3), types.String("Lisa")),
|
||||
NewResultSetRow(types.Int(4), types.Int(4), types.String("Moe")),
|
||||
),
|
||||
ExpectedSchema: NewResultSetSchema("aid", types.IntKind, "pid", types.IntKind,
|
||||
"first", types.StringKind),
|
||||
},
|
||||
}
|
||||
|
||||
// CreateTableFn returns a SetupFunc that creates a table with the rows given
|
||||
|
||||
Reference in New Issue
Block a user