You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ma...@apache.org on 2015/04/21 23:48:09 UTC
spark git commit: [SQL][minor] make it more clear that we only need
to re-throw GetField exception for UnresolvedAttribute
Repository: spark
Updated Branches:
refs/heads/master 2e8c6ca47 -> 03fd92167
[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 <cl...@outlook.com>
Closes #5588 from cloud-fan/tmp and squashes the following commits:
7ac74d2 [Wenchen Fan] small refactor
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/03fd9216
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/03fd9216
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/03fd9216
Branch: refs/heads/master
Commit: 03fd92167107f1d061c1a7ef216468b508546ac7
Parents: 2e8c6ca
Author: Wenchen Fan <cl...@outlook.com>
Authored: Tue Apr 21 14:48:02 2015 -0700
Committer: Michael Armbrust <mi...@databricks.com>
Committed: Tue Apr 21 14:48:02 2015 -0700
----------------------------------------------------------------------
.../apache/spark/sql/catalyst/analysis/CheckAnalysis.scala | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/03fd9216/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
----------------------------------------------------------------------
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
index 1155dac..a986dd5 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
@@ -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(", ")
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org