Skip to content

Commit 7ac74d2

Browse files
committed
small refactor
1 parent dc48ba9 commit 7ac74d2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,11 @@ trait CheckAnalysis {
4646
operator transformExpressionsUp {
4747
case a: Attribute if !a.resolved =>
4848
if (operator.childrenResolved) {
49-
val nameParts = a match {
50-
case UnresolvedAttribute(nameParts) => nameParts
51-
case _ => Seq(a.name)
49+
a match {
50+
case UnresolvedAttribute(nameParts) =>
51+
// Throw errors for specific problems with get field.
52+
operator.resolveChildren(nameParts, resolver, throwErrors = true)
5253
}
53-
// Throw errors for specific problems with get field.
54-
operator.resolveChildren(nameParts, resolver, throwErrors = true)
5554
}
5655

5756
val from = operator.inputSet.map(_.name).mkString(", ")

0 commit comments

Comments
 (0)