Andrey Dmitriev created HIVE-10784:
--------------------------------------
Summary: 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
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)