Github user jiangxb1987 commented on a diff in the pull request:
https://github.com/apache/spark/pull/20527#discussion_r166852743
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala
---
@@ -346,37 +349,11 @@ case class PreprocessTableInsertion(conf: SQLConf)
extends Rule[LogicalPlan] wit
""".stripMargin)
}
- castAndRenameChildOutput(insert.copy(partition =
normalizedPartSpec), expectedColumns)
+ insert.copy(query = newQuery, partition = normalizedPartSpec)
--- End diff --
nit: don't need to copy the `newQuery` if it is the same as `query`.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]