You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by li...@apache.org on 2017/04/12 16:05:09 UTC
spark git commit: [SPARK-20304][SQL] AssertNotNull should not include
path in string representation
Repository: spark
Updated Branches:
refs/heads/master 504e62e2f -> 540855382
[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 <rx...@databricks.com>
Closes #17616 from rxin/SPARK-20304.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/54085538
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/54085538
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/54085538
Branch: refs/heads/master
Commit: 540855382c8f139fbf4eb0800b31c7ce91f29c7f
Parents: 504e62e
Author: Reynold Xin <rx...@databricks.com>
Authored: Wed Apr 12 09:05:05 2017 -0700
Committer: Xiao Li <ga...@gmail.com>
Committed: Wed Apr 12 09:05:05 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/54085538/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 6d94764..eed773d 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
@@ -996,6 +996,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