Skip to content

Commit 7e0ddda

Browse files
rxingatorsmile
authored andcommitted
[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 5408553) Signed-off-by: Xiao Li <gatorsmile@gmail.com>
1 parent dbb6d1b commit 7e0ddda

File tree

1 file changed

+2
-0
lines changed
  • sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects

1 file changed

+2
-0
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/objects/objects.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,8 @@ case class AssertNotNull(child: Expression, walkedTypePath: Seq[String] = Nil)
936936
override def foldable: Boolean = false
937937
override def nullable: Boolean = false
938938

939+
override def flatArguments: Iterator[Any] = Iterator(child)
940+
939941
private val errMsg = "Null value appeared in non-nullable field:" +
940942
walkedTypePath.mkString("\n", "\n", "\n") +
941943
"If the schema is inferred from a Scala tuple/case class, or a Java bean, " +

0 commit comments

Comments
 (0)