cloud-fan commented on a change in pull request #25453: [SPARK-28730][SQL]
Configurable type coercion policy for table insertion
URL: https://github.com/apache/spark/pull/25453#discussion_r315579388
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala
##########
@@ -190,8 +190,9 @@ case class PreprocessTableCreation(sparkSession:
SparkSession) extends Rule[Logi
c.copy(
tableDesc = existingTable,
- query = Some(DDLPreprocessingUtils.castAndRenameQueryOutput(
- newQuery, existingTable.schema.toAttributes, conf)))
+ query = Some(TableOutputResolver.resolveOutputColumns(
+ tableDesc.qualifiedName, existingTable.schema.toAttributes, newQuery,
+ byName = false, conf)))
Review comment:
byName = true, see doc of `DataFrameWriter.saveAsTable`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]