Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15266#discussion_r80849187
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceStrategy.scala
 ---
    @@ -159,8 +159,9 @@ case class DataSourceAnalysis(conf: CatalystConf) 
extends Rule[LogicalPlan] {
     
     
         case i @ logical.InsertIntoTable(
    -           l @ LogicalRelation(t: HadoopFsRelation, _, _), part, query, 
overwrite, false)
    -        if query.resolved && t.schema.asNullable == 
query.schema.asNullable =>
    --- End diff --
    
    That's why I left a TODO and ask if we do need to rename: 
https://github.com/apache/spark/pull/15266/files#diff-73bd90660f41c12a87ee9fe8d35d856aL246
    
    INSERT INTO TABLE is resolved by ordinal, so the field names don't matter. 
How about we don't rename and check `t.schema.map(_.dataType.asNullable) == 
query.map(_.dataType.asNullable)` here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to