-
Notifications
You must be signed in to change notification settings - Fork 29.1k
[SPARK-28054][SQL] Fix error when insert Hive partitioned table dynamically where partition name is upper case #24886
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1188,6 +1188,24 @@ class HiveQuerySuite extends HiveComparisonTest with SQLTestUtils with BeforeAnd | |
| } | ||
| } | ||
| } | ||
|
|
||
| test("SPARK-28054: Unable to insert partitioned table when partition name is upper case") { | ||
| withTable("spark_28054_test") { | ||
| sql("set hive.exec.dynamic.partition.mode=nonstrict") | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we set it back? Use withSQLConf ? Also do we need to set the case sensitivity conf?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This set follows other tests in same suite. Using withSQLConf is good, yes. The case sensitivity conf has no effect on this, I think it is fine. |
||
| sql("CREATE TABLE spark_28054_test (KEY STRING, VALUE STRING) PARTITIONED BY (DS STRING)") | ||
|
|
||
| sql("INSERT INTO TABLE spark_28054_test PARTITION(DS) SELECT 'k' KEY, 'v' VALUE, '1' DS") | ||
|
|
||
| assertResult(Array(Row("k", "v", "1"))) { | ||
| sql("SELECT * from spark_28054_test").collect() | ||
| } | ||
|
|
||
| sql("INSERT INTO TABLE spark_28054_test PARTITION(ds) SELECT 'k' key, 'v' value, '2' ds") | ||
| assertResult(Array(Row("k", "v", "1"), Row("k", "v", "2"))) { | ||
| sql("SELECT * from spark_28054_test").collect() | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| // for SPARK-2180 test | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops..will fix in a follow-up. Thanks.