[ https://issues.apache.org/jira/browse/SPARK-33358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17226629#comment-17226629 ]
Apache Spark commented on SPARK-33358: -------------------------------------- User 'artiship' has created a pull request for this issue: 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.1 > Reporter: Lichuanliang > Priority: Major > > > 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-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org