diff options
author | wangfei <wangfei1@huawei.com> | 2014-12-30 13:44:30 -0800 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2014-12-30 13:44:30 -0800 |
commit | 8f29b7cafc2b6e802e4eb21f681d6369da2f30fa (patch) | |
tree | 9b43ab5c3e536e0da9082888bda94072b30b1d7f /sql | |
parent | 7425bec320227bf8818dc2844c12d5373d166364 (diff) | |
download | spark-8f29b7cafc2b6e802e4eb21f681d6369da2f30fa.tar.gz spark-8f29b7cafc2b6e802e4eb21f681d6369da2f30fa.tar.bz2 spark-8f29b7cafc2b6e802e4eb21f681d6369da2f30fa.zip |
[SPARK-4935][SQL] When hive.cli.print.header configured, spark-sql aborted if passed in a invalid sql
If we passed in a wrong sql like ```abdcdfsfs```, the spark-sql script aborted.
Author: wangfei <wangfei1@huawei.com>
Author: Fei Wang <wangfei1@huawei.com>
Closes #3761 from scwf/patch-10 and squashes the following commits:
46dc344 [Fei Wang] revert console.printError(rc.getErrorMessage())
0330e07 [wangfei] avoid to print error message repeatedly
1614a11 [wangfei] spark-sql abort when passed in a wrong sql
Diffstat (limited to 'sql')
-rw-r--r-- | sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/AbstractSparkSQLDriver.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/AbstractSparkSQLDriver.scala b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/AbstractSparkSQLDriver.scala index 6ed8fd2768..7a3d76c61c 100644 --- a/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/AbstractSparkSQLDriver.scala +++ b/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/AbstractSparkSQLDriver.scala @@ -60,7 +60,7 @@ private[hive] abstract class AbstractSparkSQLDriver( } catch { case cause: Throwable => logError(s"Failed in [$command]", cause) - new CommandProcessorResponse(0, ExceptionUtils.getFullStackTrace(cause), null) + new CommandProcessorResponse(1, ExceptionUtils.getFullStackTrace(cause), null) } } |