Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1736,9 +1736,8 @@ class Analyzer(
Assignment(key, sourceAttr)
}
} else {
sourceTable.output.flatMap { sourceAttr =>
findAttrInTarget(sourceAttr.name).map(
targetAttr => Assignment(targetAttr, sourceAttr))
targetTable.output.map { attr =>
Assignment(attr, UnresolvedAttribute(Seq(attr.name)))
}
}
UpdateAction(
Expand Down Expand Up @@ -1775,9 +1774,8 @@ class Analyzer(
Assignment(key, sourceAttr)
}
} else {
sourceTable.output.flatMap { sourceAttr =>
findAttrInTarget(sourceAttr.name).map(
targetAttr => Assignment(targetAttr, sourceAttr))
targetTable.output.map { attr =>
Assignment(attr, UnresolvedAttribute(Seq(attr.name)))
}
}
InsertAction(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ object ResolveRowLevelCommandAssignments extends Rule[LogicalPlan] {
case m: MergeIntoTable if !m.skipSchemaResolution && m.resolved && m.rewritable && !m.aligned &&
!m.needSchemaEvolution =>
validateStoreAssignmentPolicy()
val coerceNestedTypes = SQLConf.get.coerceMergeNestedTypes
val coerceNestedTypes = SQLConf.get.coerceMergeNestedTypes && m.withSchemaEvolution
m.copy(
targetTable = cleanAttrMetadata(m.targetTable),
matchedActions = alignActions(m.targetTable.output, m.matchedActions,
Expand Down
Loading