hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chinna Rao Lalam (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-10784) Beeline requires new line (EOL) at the end of an Hive SQL script (NullPointerException)
Date Thu, 21 May 2015 15:18:17 GMT

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

Chinna Rao Lalam commented on HIVE-10784:
-----------------------------------------

Hi [~biosetup],

Scenario 1 and 3 able to reproduce and 2 is not reproducing, can you upload a script file
for scenario 2.
Attached a workaround patch to fix scenario 1.


> Beeline requires new line (EOL) at the end of an Hive SQL script (NullPointerException)
> ---------------------------------------------------------------------------------------
>
>                 Key: HIVE-10784
>                 URL: https://issues.apache.org/jira/browse/HIVE-10784
>             Project: Hive
>          Issue Type: Bug
>          Components: Beeline, CLI
>    Affects Versions: 0.13.1
>         Environment: Linux 2.6.32 (Red Hat 4.4.7)
>            Reporter: Andrey Dmitriev
>            Priority: Minor
>         Attachments: HIVE-10784.patch
>
>
> Beeline tool requires to have "new line" at the end of a Hive/Impala SQL script otherwise
the last statement will be not executed or NullPointerException will be thrown.
> # If a statement ends without end of line AND semicolon is on the same line then the
statement will be ignored; i.e.
> {code}select * from TABLE;<EOF>{code} will be *not* executed
> # If a statement ends without end of line BUT semicolon is on the next line then the
statement will be executed, but {color:red};java.lang.NullPointerException{color} will be
thrown; i.e.
> {code}select * from TABLE
> ;<EOF>{code} will be executed, but print {color:red};java.lang.NullPointerException{color}
> # If a statement ends with end of line regardless where semicolon is then the statement
will be executed; i.e.
> {code}select * from TABLE;
> <EOL><EOF>{code}
> or
> {code}select * from TABLE
> ;<EOL><EOF>{code}
> will be executed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message