maropu commented on a change in pull request #25453: [WIP][SPARK-28730][SQL]
Configurable type coercion policy for table insertion
URL: https://github.com/apache/spark/pull/25453#discussion_r315478904
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -2525,7 +2525,8 @@ class Analyzer(
override def apply(plan: LogicalPlan): LogicalPlan = plan.resolveOperators
{
case append @ AppendData(table, query, isByName)
if table.resolved && query.resolved && !append.outputResolved =>
- val projection = resolveOutputColumns(table.name, table.output, query,
isByName)
+ val projection =
+ TableOutputResolver.resolveOutputColumns(table.name, table.output,
query, isByName, conf)
Review comment:
The code in line2528-2535, line2539-2546, and line2550-2557 is duplicate, so
can we merge them into one rule by defining an extractor(unapply)?
----------------------------------------------------------------
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]