-
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
Changes from 1 commit
1e647ee
4467077
33ab217
d8efb9d
11d1818
22e1e4f
743a069
f6eab2d
09da8d6
6d03f31
a0b9b05
91b6424
37ad3f3
d0d9d3e
cbe9c71
c69270f
af959f6
8d3e10a
9b386d5
a878510
be20127
f41bf80
0526391
9e199bc
1ae132d
5c29a75
5ed2c0d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
This reverts commit 12159c403955f54066ed8c532ed991f829edfc1f.
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -63,6 +63,13 @@ case class InsertIntoHadoopFsRelationCommand( | |
|
|
||
| override def run(sparkSession: SparkSession, children: Seq[SparkPlan]): Seq[Row] = { | ||
| assert(children.length == 1) | ||
|
|
||
| // Most formats don't do well with duplicate columns, so lets not allow that | ||
| SchemaUtils.checkSchemaColumnNameDuplication( | ||
|
||
| query.schema, | ||
| s"when inserting into $outputPath", | ||
| sparkSession.sessionState.conf.caseSensitiveAnalysis) | ||
|
|
||
| val hadoopConf = sparkSession.sessionState.newHadoopConfWithOptions(options) | ||
| val fs = outputPath.getFileSystem(hadoopConf) | ||
| val qualifiedOutputPath = outputPath.makeQualified(fs.getUri, fs.getWorkingDirectory) | ||
|
|
||
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.
what are we checking here? both user-specified schema and inferred schema should have been checked
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.
yea, I'll remove (I wrongly reverted this entry, too...)