Zoltan Fedor created HIVE-9877: ---------------------------------- Summary: 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
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; >> 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://c701ekh.int.westgroup.com> USE biapp;SHOW TABLES; Error: Error while compiling statement: FAILED: ParseException line 1:9 missing EOF at ';' near 'biapp' (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)