Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/20527#discussion_r166865065
--- 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 --
it's also ok to always copy it and the code is neater.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]