[
https://issues.apache.org/jira/browse/SPARK-33358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dongjoon Hyun updated SPARK-33358:
----------------------------------
Affects Version/s: 3.1.0
> 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, 3.1.0
> Reporter: Lichuanliang
> Assignee: Lichuanliang
> Priority: Critical
> Labels: correctness
> Fix For: 3.0.2, 3.1.0
>
>
>
> 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: [email protected]
For additional commands, e-mail: [email protected]