You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Lars Francke (JIRA)" <ji...@apache.org> on 2015/04/19 22:48:59 UTC

[jira] [Commented] (HIVE-9877) Beeline cannot run multiple statements in the same row

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

Lars Francke commented on HIVE-9877:
------------------------------------

Thanks [~ctang.ma]. I see your points and while I disagree with the conclusion I won't argue the change. I just wanted to raise it in case you weren't aware of the previous discussions. Let's keep it the way it is now.

> Beeline cannot run multiple statements in the same row
> ------------------------------------------------------
>
>                 Key: HIVE-9877
>                 URL: https://issues.apache.org/jira/browse/HIVE-9877
>             Project: Hive
>          Issue Type: Bug
>          Components: Beeline
>    Affects Versions: 0.12.0
>         Environment: Oracle Linux 6.5, x64, Cloudera 5.1.3, Hive 0.12.0
>            Reporter: Zoltan Fedor
>            Assignee: Chaoyu Tang
>              Labels: TODOC1.2
>             Fix For: 1.2.0
>
>         Attachments: HIVE-9877.patch, HIVE-9877.patch
>
>
> I'm trying to switch from hive cli to beeline and found the below working with hive cli, but not with beeline.
> This works in hive cli:
> $ hive -e "USE my_db;SHOW TABLES;" 
> The same does not work in beeline:
> $ beeline -u jdbc:hive2://my_server.com -n my_user -p my_password -e "USE my_db;SHOW TABLES;"
> Error: Error while compiling statement: FAILED: ParseException line 1:9 missing EOF at ';' near 'my_db' (state=42000,code=40000)
> Beeline version 0.12.0-cdh5.1.3 by Apache Hive 
> I have also tried with beeline -f [filename]
> The issue is the same, except (!) when the two statements are listed in separate lines in the file supplied via the -f parameter.
> So when using 
> beeline -f my.hql
> This works:
> my.hql:
> USE my_db;
> SHOW TABLES;
> This does not work:
> my.hql:
> USE my_db;SHOW TABLES;
> $ beeline -u jdbc:hive2://my_server.com -n my_user -p my_password -f my.hql
> Connected to: Apache Hive (version 0.12.0-cdh5.1.3)
> Driver: Hive JDBC (version 0.12.0-cdh5.1.3)
> Transaction isolation: TRANSACTION_REPEATABLE_READ
> Beeline version 0.12.0-cdh5.1.3 by Apache Hive
> 0: jdbc:hive2://my_server.com> USE my_db;SHOW TABLES;
> Error: Error while compiling statement: FAILED: ParseException line 1:9 missing EOF at ';' near 'my_db' (state=42000,code=40000)
> Closing: org.apache.hive.jdbc.HiveConnection
> How to reproduce:
> Run any type of multiple statements with beeline where the statements are in the same line separated by ; whether using "beeline -e [statement]" or "beeline -f [file]"



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