Skip to content
Snippets Groups Projects
Commit 03fd9216 authored by Wenchen Fan's avatar Wenchen Fan Committed by Michael Armbrust
Browse files

[SQL][minor] make it more clear that we only need to re-throw GetField...

[SQL][minor] make it more clear that we only need to re-throw GetField exception for UnresolvedAttribute

For `GetField` outside `UnresolvedAttribute`, we will throw exception in `Analyzer`.

Author: Wenchen Fan <cloud0fan@outlook.com>

Closes #5588 from cloud-fan/tmp and squashes the following commits:

7ac74d2 [Wenchen Fan] small refactor
parent 2e8c6ca4
No related branches found
No related tags found
No related merge requests found
......@@ -46,12 +46,11 @@ trait CheckAnalysis {
operator transformExpressionsUp {
case a: Attribute if !a.resolved =>
if (operator.childrenResolved) {
val nameParts = a match {
case UnresolvedAttribute(nameParts) => nameParts
case _ => Seq(a.name)
a match {
case UnresolvedAttribute(nameParts) =>
// Throw errors for specific problems with get field.
operator.resolveChildren(nameParts, resolver, throwErrors = true)
}
// Throw errors for specific problems with get field.
operator.resolveChildren(nameParts, resolver, throwErrors = true)
}
val from = operator.inputSet.map(_.name).mkString(", ")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment