-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-20460][SQL] Make it more consistent to handle column name duplication #17758
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
1e647ee
Share code to check column name duplication
maropu 4467077
Apply reviews
maropu 33ab217
Make code more consistent
maropu d8efb9d
Apply review comments
maropu 11d1818
Apply xiao's reviews
maropu 22e1e4f
Apply more xiao's reviews
maropu 743a069
Replace map with foreach
maropu f6eab2d
Add tests for data schema + parititon schema
maropu 09da8d6
Drop name dplication checks in HiveMetastoreCatalog.scala
maropu 6d03f31
Modify exception messages
maropu a0b9b05
Revert logic to check name duplication
maropu 91b6424
Add tests for write paths
maropu 37ad3f3
Add tests for stream sink paths
maropu d0d9d3e
Burhs up code and adds more tests
maropu cbe9c71
Apply reviews
maropu c69270f
Apply more comments
maropu af959f6
Add more tests in create.sql
maropu 8d3e10a
Move duplication checks in constructor
maropu 9b386d5
Brush up code
maropu a878510
[WIP] Add DataSourceValidator trait to validate schema in write path
maropu be20127
Revert "Brush up code"
maropu f41bf80
Fix more issues
maropu 0526391
Revert DataSourceValidator
maropu 9e199bc
Add the check for external relation providers
maropu 1ae132d
[WIP] Handle DataSource name duplication in one place
maropu 5c29a75
Fix more
maropu 5ed2c0d
Move some tests to DDLSuite
maropu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add more tests in create.sql
- Loading branch information
commit af959f6a55937e25db52cd2d94fc65af7f3a40d6
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,19 @@ | ||
| -- Catch case-sensitive name duplication | ||
| SET spark.sql.caseSensitive=true; | ||
|
|
||
| CREATE TABLE t (c0 STRING, c1 INT, c1 DOUBLE, c0 INT) USING parquet; | ||
| CREATE TABLE t(c0 STRING, c1 INT, c1 DOUBLE, c0 INT) USING parquet; | ||
|
|
||
| CREATE TABLE t(c0 INT, c1 INT) PARTITIONED BY (c1 INT) STORED AS parquet; | ||
|
|
||
| CREATE TABLE t(c0 INT) PARTITIONED BY (c1 INT, c1 INT) STORED AS parquet; | ||
|
|
||
| -- Catch case-insensitive name duplication | ||
| SET spark.sql.caseSensitive=false; | ||
|
|
||
| CREATE TABLE t (c0 STRING, c1 INT, c1 DOUBLE, c0 INT) USING parquet; | ||
| CREATE TABLE t(c0 STRING, c1 INT, c1 DOUBLE, c0 INT) USING parquet; | ||
|
|
||
| CREATE TABLE t(ab STRING, cd INT, ef DOUBLE, Ab INT) USING parquet; | ||
|
|
||
| CREATE TABLE t(ab INT, cd INT) PARTITIONED BY (Ab INT) STORED AS parquet; | ||
|
|
||
| CREATE TABLE t (ab STRING, cd INT, ef DOUBLE, Ab INT) USING parquet; | ||
| CREATE TABLE t(ab INT, cd INT) PARTITIONED BY (Ab INT, aB INT) STORED AS parquet; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We didn't have test cases for create table before?
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.
In
DDLSuite, we already have simple tests for duplicate columns. we better moving these tests there?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.
We should keep them in one place. For now I think we still need to put them in
DDLSuitebecause we need to run it with and without hive support. Can we pick some typical test cases here and move them toDDLSuite?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.
ok, will update
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.
I moved some tests to
DDLSuiteand removed this file.