You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Victoria Markman (JIRA)" <ji...@apache.org> on 2015/05/14 03:00:00 UTC
[jira] [Created] (DRILL-3077) sqlline's return code is 0 even when
it force exits due to failed sql command
Victoria Markman created DRILL-3077:
---------------------------------------
Summary: sqlline's return code is 0 even when it force exits due to failed sql command
Key: DRILL-3077
URL: https://issues.apache.org/jira/browse/DRILL-3077
Project: Apache Drill
Issue Type: Bug
Reporter: Victoria Markman
My SQL script looks like this:
{code}
select * from sys.options limit 1;
select * sys.options; <--- from clause is missing
select * from sys.options limit 1;
{code}
sqlline correctly exists (--force is set to true by default).
However, return code is '0', which makes scripting challenging.
It should be set to 1.
{code}
[Wed May 13 17:49:39 root@~ ] # ${DRILL_HOME}/bin/sqlline -u "jdbc:drill:schema=dfs.ctas_parquet" --run=/root/script.sql
1/5 select * from sys.options limit 1;
+------------+------------+------------+------------+------------+------------+------------+------------+
| name | kind | type | status | num_val | string_val | bool_val | float_val |
+------------+------------+------------+------------+------------+------------+------------+------------+
| drill.exec.rpc.bit.server.retry.delay | LONG | BOOT | BOOT | 500 | null | null | null |
+------------+------------+------------+------------+------------+------------+------------+------------+
1 row selected (0.247 seconds)
2/5
3/5 select * sys.options;
Error: PARSE ERROR: Encountered "." at line 1, column 13.
Was expecting one of:
"FROM" ...
"," ...
[Error Id: 9da00514-6a96-4d9a-b90a-c903d006c060 on atsqa4-133.qa.lab:31010] (state=,code=0)
Aborting command set because "force" is false and command failed: "select * sys.options;"
Closing: org.apache.drill.jdbc.DrillJdbc41Factory$DrillJdbc41Connection
sqlline version 1.1.6
[Wed May 13 17:53:56 root@~ ] # echo $?
0
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)