You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Dongjoon Hyun (Jira)" <ji...@apache.org> on 2020/11/16 01:00:03 UTC
[jira] [Resolved] (SPARK-33358) Spark SQL CLI command processing
loop can't exit while one comand fail
[ https://issues.apache.org/jira/browse/SPARK-33358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dongjoon Hyun resolved SPARK-33358.
-----------------------------------
Fix Version/s: 3.0.2
3.1.0
Resolution: Fixed
Issue resolved by pull request 30263
[https://github.com/apache/spark/pull/30263]
> Spark SQL CLI command processing loop can't exit while one comand fail
> ----------------------------------------------------------------------
>
> Key: SPARK-33358
> URL: https://issues.apache.org/jira/browse/SPARK-33358
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 3.0.0, 3.0.1
> Reporter: Lichuanliang
> Priority: Major
> Labels: correctness
> Fix For: 3.1.0, 3.0.2
>
>
>
> When submit a multiple statements sql script through bin/spark-sql, if one of the prior command fail, the processing loop will not exit and continuing executing the following statements, and finally makes the whole program success.
>
> {code:java}
> for (oneCmd <- commands) {
> if (StringUtils.endsWith(oneCmd, "\\")) {
> command += StringUtils.chop(oneCmd) + ";"
> } else {
> command += oneCmd
> if (!StringUtils.isBlank(command)) {
> val ret = processCmd(command)
> command = ""
> lastRet = ret
> val ignoreErrors = HiveConf.getBoolVar(conf, HiveConf.ConfVars.CLIIGNOREERRORS)
> if (ret != 0 && !ignoreErrors) {
> CommandProcessorFactory.clean(conf.asInstanceOf[HiveConf])
> ret // for loop will not return if one of the commands fail
> }
> }
> }
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org