Github user tejasapatil commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13492#discussion_r65732323
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala 
---
    @@ -78,8 +78,8 @@ private[sql] object PreInsertCastAndRename extends 
Rule[LogicalPlan] {
             // schema of the relation.
             if (l.output.size != child.output.size) {
               sys.error(
    -            s"$l requires that the query in the SELECT clause of the 
INSERT INTO/OVERWRITE " +
    -              s"statement generates the same number of columns as its 
schema.")
    +            s"$l requires that the data to be inserted have " +
    --- End diff --
    
    the error message can be made more informative by including the count of 
columns in the table schema and number of columns in the data being inserted.


---
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