spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lix...@apache.org
Subject spark git commit: [SPARK-20304][SQL] AssertNotNull should not include path in string representation
Date Wed, 12 Apr 2017 16:05:22 GMT
Repository: spark
Updated Branches:
  refs/heads/branch-2.1 dbb6d1b44 -> 7e0ddda34


[SPARK-20304][SQL] AssertNotNull should not include path in string representation

## What changes were proposed in this pull request?
AssertNotNull's toString/simpleString dumps the entire walkedTypePath. walkedTypePath is used
for error message reporting and shouldn't be part of the output.

## How was this patch tested?
Manually tested.

Author: Reynold Xin <rxin@databricks.com>

Closes #17616 from rxin/SPARK-20304.

(cherry picked from commit 540855382c8f139fbf4eb0800b31c7ce91f29c7f)
Signed-off-by: Xiao Li <gatorsmile@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/7e0ddda3
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/7e0ddda3
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/7e0ddda3

Branch: refs/heads/branch-2.1
Commit: 7e0ddda34ca205f98453ecb2d13132cf8d014641
Parents: dbb6d1b
Author: Reynold Xin <rxin@databricks.com>
Authored: Wed Apr 12 09:05:05 2017 -0700
Committer: Xiao Li <gatorsmile@gmail.com>
Committed: Wed Apr 12 09:05:15 2017 -0700

----------------------------------------------------------------------
 .../apache/spark/sql/catalyst/expressions/objects/objects.scala    | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/7e0ddda3/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala
----------------------------------------------------------------------
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala
b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala
index c5793e1..256de74 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala
@@ -936,6 +936,8 @@ case class AssertNotNull(child: Expression, walkedTypePath: Seq[String]
= Nil)
   override def foldable: Boolean = false
   override def nullable: Boolean = false
 
+  override def flatArguments: Iterator[Any] = Iterator(child)
+
   private val errMsg = "Null value appeared in non-nullable field:" +
     walkedTypePath.mkString("\n", "\n", "\n") +
     "If the schema is inferred from a Scala tuple/case class, or a Java bean, " +


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org


Mime
View raw message