Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/15316#discussion_r82643571
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/AnalysisException.scala ---
@@ -43,6 +43,11 @@ class AnalysisException protected[sql] (
}
override def getMessage: String = {
+ val planAnnotation = plan.map(p => s";\n$p").getOrElse("")
--- End diff --
When hitting an `AnalysisException`, we called `getMessage` in
`SQLQueryTestSuite.scala`. That means, we also output the logical plan in the
`.sql.out` when hitting an `AnalysisException`. The logical plan contains
expression IDs. Thus, when we doing the text compare between the query results
with the contents in `.sql.out`, it might fail due to the mismatch of
expression IDs. Thus, I added an extra function here. Maybe I need to add a
comment to say `this is for testing only`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]