diff options
author | Yin Huai <yhuai@databricks.com> | 2016-03-18 13:40:53 -0700 |
---|---|---|
committer | Yin Huai <yhuai@databricks.com> | 2016-03-18 13:40:53 -0700 |
commit | 238fb485be4cdf8337cacc58c31a9f885a99853c (patch) | |
tree | d1bd8a138c83464a9aea42fdd732f2ef5035807b /docs/running-on-mesos.md | |
parent | 2e0c5284fd88ba89f53f93dcf1eb26bca2be49c5 (diff) | |
download | spark-238fb485be4cdf8337cacc58c31a9f885a99853c.tar.gz spark-238fb485be4cdf8337cacc58c31a9f885a99853c.tar.bz2 spark-238fb485be4cdf8337cacc58c31a9f885a99853c.zip |
[SPARK-13972][SQL][FOLLOW-UP] When creating the query execution for a converted SQL query, we eagerly trigger analysis
## What changes were proposed in this pull request?
As part of testing generating SQL query from a analyzed SQL plan, we run the generated SQL for tests in HiveComparisonTest. This PR makes the generated SQL get eagerly analyzed. So, when a generated SQL has any analysis error, we can see the error message created by
```
case NonFatal(e) => fail(
s"""Failed to analyze the converted SQL string:
|
|# Original HiveQL query string:
|$queryString
|
|# Resolved query plan:
|${originalQuery.analyzed.treeString}
|
|# Converted SQL query string:
|$convertedSQL
""".stripMargin, e)
```
Right now, if we can parse a generated SQL but fail to analyze it, we will see error message generated by the following code (it only mentions that we cannot execute the original query, i.e. `queryString`).
```
case e: Throwable =>
val errorMessage =
s"""
|Failed to execute query using catalyst:
|Error: ${e.getMessage}
|${stackTraceToString(e)}
|$queryString
|$query
|== HIVE - ${hive.size} row(s) ==
|${hive.mkString("\n")}
""".stripMargin
```
## How was this patch tested?
Existing tests.
Author: Yin Huai <yhuai@databricks.com>
Closes #11825 from yhuai/SPARK-13972-follow-up.
Diffstat (limited to 'docs/running-on-mesos.md')
0 files changed, 0 insertions, 0 deletions