[ https://issues.apache.org/jira/browse/HIVE-9263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14319993#comment-14319993 ]
Georg Zigldrum commented on HIVE-9263: -------------------------------------- Beeline should report a non zero exit code if the query results in an error. Currently the exit code is 0 so that the shell script would not recognize an error. Example: # cat test.sh ========================= #!/bin/bash beeline -e "show tables in abc" echo "Retun Code - $?" ========================= This will give a return code of 0 despite the error: > sh test.sh Error: Error while compiling statement: FAILED: SemanticException [Error 10072]: Database does not exist: abc (state=42000,code=10072) Retun Code - 0 > Implement controllable exit code in beeline > ------------------------------------------- > > Key: HIVE-9263 > URL: https://issues.apache.org/jira/browse/HIVE-9263 > Project: Hive > Issue Type: Improvement > Components: Beeline > Reporter: Johndee Burks > Priority: Minor > > It would be nice if beeline implemented something like SQLPlus WHENEVER to > control exit codes. This would be useful when performing beeline actions > through a shell script. -- This message was sent by Atlassian JIRA (v6.3.4#6332)