Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions enginetest/join_op_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -1984,6 +1984,56 @@ SELECT SUM(x) FROM xy WHERE x IN (
},
},
},
{
name: "string key test",
setup: [][]string{
{
`
CREATE TABLE testA (
id int PRIMARY KEY,
supplierkey VARCHAR(100),
name VARCHAR(100),
product VARCHAR(100),
UNIQUE KEY unique_product_supplier_key (product, supplierKey)
);`,
`
CREATE TABLE testB (
id int PRIMARY KEY,
vendorkey VARCHAR(100),
name VARCHAR(100),
supplierkey VARCHAR(100),
product VARCHAR(100),
UNIQUE KEY unique_product_vendor_key (product,vendorKey)
);`,
"INSERT INTO testA VALUES (1, 'texwin-post-frame', 'Texwin (Post Frame)', 'carports');",
"INSERT INTO testA VALUES (2, 'texwin', 'Texwin', 'carports');",
"INSERT INTO testB VALUES (1, 'advancebldg', 'Test', 'texwin', 'carports');",
},
},
tests: []JoinOpTests{
{
Query: `
SELECT
v.vendorkey AS vendor,
v.product,
v.supplierkey,
s.name AS supplierName
FROM
testB AS v
INNER JOIN
testA AS s
ON
s.supplierkey = v.supplierkey AND
s.product = v.product
WHERE
v.vendorkey = 'advancebldg';
`,
Expected: []sql.Row{
{"advancebldg", "carports", "texwin", "Texwin"},
},
},
},
},
}

var rangeJoinOpTests = []JoinOpTests{
Expand Down
Loading