Skip to content
Snippets Groups Projects
Commit 79e2caa1 authored by gatorsmile's avatar gatorsmile Committed by Sean Owen
Browse files

[SPARK-16598][SQL][TEST] Added a test case for verifying the table identifier parsing

#### What changes were proposed in this pull request?
So far, the test cases of `TableIdentifierParserSuite` do not cover the quoted cases. We should add one for avoiding regression.

#### How was this patch tested?
N/A

Author: gatorsmile <gatorsmile@gmail.com>

Closes #14244 from gatorsmile/quotedIdentifiers.
parent f4482225
No related branches found
No related tags found
No related merge requests found
......@@ -68,6 +68,14 @@ class TableIdentifierParserSuite extends SparkFunSuite {
}
}
test("quoted identifiers") {
assert(TableIdentifier("z", Some("x.y")) === parseTableIdentifier("`x.y`.z"))
assert(TableIdentifier("y.z", Some("x")) === parseTableIdentifier("x.`y.z`"))
assert(TableIdentifier("z", Some("`x.y`")) === parseTableIdentifier("```x.y```.z"))
assert(TableIdentifier("`y.z`", Some("x")) === parseTableIdentifier("x.```y.z```"))
assert(TableIdentifier("x.y.z", None) === parseTableIdentifier("`x.y.z`"))
}
test("table identifier - strict keywords") {
// SQL Keywords.
hiveStrictNonReservedKeyword.foreach { keyword =>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment