Skip to content
Snippets Groups Projects
Commit 7e0ddda3 authored by Reynold Xin's avatar Reynold Xin Committed by Xiao Li
Browse files

[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 54085538)
Signed-off-by: default avatarXiao Li <gatorsmile@gmail.com>
parent dbb6d1b4
No related branches found
No related tags found
No related merge requests found
......@@ -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, " +
......
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