Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[no-release-notes] adding test case for case-insensitive key lookups #2640

Merged
merged 3 commits into from
Aug 26, 2024
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
31 changes: 31 additions & 0 deletions enginetest/join_op_tests.go
Original file line number Diff line number Diff line change
Expand Up @@ -1873,6 +1873,37 @@ SELECT SUM(x) FROM xy WHERE x IN (
},
},
},
{
name: "case insensitive key column names",
setup: [][]string{
{
"CREATE TABLE DEPARTMENTS (ID VARCHAR(8) PRIMARY KEY, NAME VARCHAR(255));",
"CREATE TABLE EMPLOYEES (ID VARCHAR(8) PRIMARY KEY, FIRSTNAME VARCHAR(255), DEPARTMENT_ID VARCHAR(8));",
"INSERT INTO DEPARTMENTS (ID, NAME) VALUES ('101', 'Human Resources'), ('102', 'Finance'), ('103', 'IT');",
"INSERT INTO EMPLOYEES (ID, FIRSTNAME,DEPARTMENT_ID) VALUES ('001', 'John', '101'), ('002', 'Jane','102'), ('003', 'Emily','103');",
},
},
tests: []JoinOpTests{
{
Query: "SELECT * FROM EMPLOYEES e INNER JOIN DEPARTMENTS d ON e.DEPARTMENT_ID = d.ID WHERE e.DEPARTMENT_ID = '102';",
Expected: []sql.Row{
{"002", "Jane", "102", "102", "Finance"},
},
},
{
Query: "SELECT * FROM EMPLOYEES e INNER JOIN DEPARTMENTS d ON e.department_id = d.ID WHERE e.department_id = '102';",
Expected: []sql.Row{
{"002", "Jane", "102", "102", "Finance"},
},
},
{
Query: "SELECT * FROM EMPLOYEES e INNER JOIN DEPARTMENTS d ON e.DePaRtMeNt_Id = d.ID WHERE e.dEpArTmEnT_iD = '102';",
Expected: []sql.Row{
{"002", "Jane", "102", "102", "Finance"},
},
},
},
},
}

var rangeJoinOpTests = []JoinOpTests{
Expand Down
Loading