You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Zoltan Haindrich (JIRA)" <ji...@apache.org> on 2018/04/10 06:18:00 UTC

[jira] [Commented] (HIVE-19048) Initscript errors are ignored

    [ https://issues.apache.org/jira/browse/HIVE-19048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16431776#comment-16431776 ] 

Zoltan Haindrich commented on HIVE-19048:
-----------------------------------------

well..unfortunately errors are being ignored... could you take a second look at the description?
I think the following 2 things are problematic:

* the -f query is executed; even thru the init script have bumped into an error
* the exit code if beeline is non-zero

I think if the init script contains an error; beeline should stop right away and exit with a non-zero exitcode (iff --force is not given)

> Initscript errors are ignored
> -----------------------------
>
>                 Key: HIVE-19048
>                 URL: https://issues.apache.org/jira/browse/HIVE-19048
>             Project: Hive
>          Issue Type: Bug
>          Components: Beeline
>            Reporter: Zoltan Haindrich
>            Assignee: Bharathkrishna Guruvayoor Murali
>            Priority: Major
>
> I've been running some queries for a while when I've noticed that my initscript has an error; and beeline stops interpreting the initscript after encountering the first error.
> {code}
> echo 'invalid;' > init.sql
> echo 'select 1;' > s1.sql
> beeline -u jdbc:hive2://localhost:10000/ -n hive -i init.sql -f s1.sql 
> [...]
> Running init script init.sql
> 0: jdbc:hive2://localhost:10000/> invalid;
> Error: Error while compiling statement: FAILED: ParseException line 1:0 cannot recognize input near 'invalid' '<EOF>' '<EOF>' (state=42000,code=40000)
> 0: jdbc:hive2://localhost:10000/> select 1;
> [...]
> $ echo $?
> 0
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)