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

Zachmu/case insensitive #665

Merged
merged 7 commits into from
May 8, 2020
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Unskipped and expanded case insensitivity tests
Signed-off-by: Zach Musgrave <zach@liquidata.co>
  • Loading branch information
zachmu committed May 7, 2020
commit e24d6ffeea1d8a99156711c663af999bfd1f4175
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,39 @@ teardown() {
@test "capital letter column names. select with an as" {
run dolt sql -q "select Aaa as AAA from test"
[ "$status" -eq 0 ]
skip "select as lowercases everything right now"
[[ "$output" =~ "AAA" ]] || false
}

@test "select table case insensitive, table and column" {
run dolt sql -r csv -q "select aaa as AAA from TEST order by 1 limit 1"
[ "$status" -eq 0 ]
[[ "$output" =~ "AAA" ]] || false
}

@test "select table case insensitive, table and column" {
run dolt sql -r csv -q "select Test.aaa as AAA from TEST order by 1 limit 1"
[ "$status" -eq 0 ]
[[ "$output" =~ "AAA" ]] || false
[[ "$output" =~ "1" ]] || false
}

@test "select table alias case insensitive" {
run dolt sql -r csv -q "select t.aaA as AaA from TEST T order by 1 limit 1"
[ "$status" -eq 0 ]
[[ "$output" =~ "AaA" ]] || false
[[ "$output" =~ "1" ]] || false
}

@test "select reserved word, preserve case" {
run dolt sql -q "select 1 as DaTe"
[ "$status" -eq 0 ]
[[ "$output" =~ "DaTe" ]] || false
}

@test "select column with different case" {
run dolt sql -q "select AaA from Test order by 1 limit 1"
[ "$status" -eq 0 ]
[[ "$output" =~ "1" ]] || false
skip "Column names come back as the table declares them, not as written in the query"
[[ "$output" =~ "AaA" ]] || false
}