Manasa A created HIVE-22471:
-------------------------------

             Summary: Beeline init script breaks when executing multi line 
commands
                 Key: HIVE-22471
                 URL: https://issues.apache.org/jira/browse/HIVE-22471
             Project: Hive
          Issue Type: Bug
    Affects Versions: 2.3.5
         Environment: Tested this on Hive version 2.3.5.
            Reporter: Manasa A


On a Hadoop cluster with hive version 2.3.5, when the beeline is initialized 
using init script, multi line commands fails. 
beeline -u 'jdbc:hive2://localhost:10000/default' -n hive -i init.sql


0: jdbc:hive2://localhost:10000/default> select * 
. . . . . . . . . . . . . . . . . . . .> Error: Error while compiling 
statement: FAILED: SemanticException Line 0:-1 Invalid column reference 
'TOK_ALLCOLREF' (state=42000,code=40000)
0: jdbc:hive2://localhost:10000/default> from employee;
Error: Error while compiling statement: FAILED: ParseException line 1:13 
required (...)+ loop did not match anything at input '<EOF>' in statement 
(state=42000,code=40000)
0: jdbc:hive2://localhost:10000/default> 
It works fine when tested without init.sql
beeline -u 'jdbc:hive2://localhost:10000/default'

0: jdbc:hive2://localhost:10000/default> select *
. . . . . . . . . . . . . . . . . . . .> from employee;
INFO  : Compiling 
command(queryId=hive_20191106025801_67b13296-c10d-484e-adc8-7522fc7ed111): 
select *
from employee
INFO  : Semantic Analysis Completed
INFO  : Returning Hive schema: 
Schema(fieldSchemas:[FieldSchema(name:employee.eid, type:int, comment:null), 
FieldSchema(name:employee.name, type:string, comment:null), 
FieldSchema(name:employee.salary, type:string, comment:null), 
FieldSchema(name:employee.destination, type:string, comment:null)], 
properties:null)
INFO  : Completed compiling 
command(queryId=hive_20191106025801_67b13296-c10d-484e-adc8-7522fc7ed111); Time 
taken: 0.139 seconds
INFO  : Concurrency mode is disabled, not creating a lock manager
INFO  : Executing 
command(queryId=hive_20191106025801_67b13296-c10d-484e-adc8-7522fc7ed111): 
select *
from employee
INFO  : Completed executing 
command(queryId=hive_20191106025801_67b13296-c10d-484e-adc8-7522fc7ed111); Time 
taken: 0.001 seconds
INFO  : OK
+---------------+----------------+------------------+-----------------------+
| employee.eid  | employee.name  | employee.salary  | employee.destination  |
 

init.sql file  have the below command and it fails with any other commands 
as-well. 

set hive.exec.dynamic.partition.mode=nonstrict;



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to