[ 
https://issues.apache.org/jira/browse/HIVE-22440?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shawn Weeks updated HIVE-22440:
-------------------------------
    Description: 
This seems to be related to HIVE-13864 but I'm not sure that HIVE-16935 fixes 
it as the example is different. Please flag as a dupe and close if that's the 
case.

If you download the two attached files and run this command it's quits parsing 
at the comment.

{{beeline -u jdbc:hive2://localhost:10000 -f ./bug_run.sql}}

{{ Error: Error while compiling statement: FAILED: SemanticException [Error 
10004]: Line 1:7 Invalid table alias or column reference 'c1': (possible column 
names are: ) (state=42000,code=10004)}}

  was:
This seems to be related to HIVE-13864 but I'm not sure that HIVE-16935 fixes 
it as the example is different. Please flag as a dupe and close if that's the 
case.

If you download the two attached files and run this command it's quits parsing 
at the comment.

{{beeline -u jdbc:hive2://localhost:10000 -f ./bug_run.sql}}

{{Connecting to jdbc:hive2://localhost:10000/default
Connected to: Apache Hive (version 2.3.5-amzn-1)
Driver: Hive JDBC (version 2.3.5-amzn-1)
Transaction isolation: TRANSACTION_REPEATABLE_READ
0: jdbc:hive2://localhost:10000/default> !run bug_example.sql
>>>  create table if not exists bug_test (c1 string) stored as orc;
INFO  : Compiling 
command(queryId=hive_20191031141030_42617cb4-bff2-48a3-85f2-e4eb08997a71): 
create table if not exists bug_test (c1 string) stored as orc
INFO  : Semantic Analysis Completed
INFO  : Returning Hive schema: Schema(fieldSchemas:null, properties:null)
INFO  : Completed compiling 
command(queryId=hive_20191031141030_42617cb4-bff2-48a3-85f2-e4eb08997a71); Time 
taken: 0.005 seconds
INFO  : Concurrency mode is disabled, not creating a lock manager
INFO  : Executing 
command(queryId=hive_20191031141030_42617cb4-bff2-48a3-85f2-e4eb08997a71): 
create table if not exists bug_test (c1 string) stored as orc
INFO  : Completed executing 
command(queryId=hive_20191031141030_42617cb4-bff2-48a3-85f2-e4eb08997a71); Time 
taken: 0.002 seconds
INFO  : OK
No rows affected (0.048 seconds)
>>>
>>>  select 'Hello World'
from bug_test;
INFO  : Compiling 
command(queryId=hive_20191031141030_b97f4ba2-7d18-49b8-a348-8316cc8ae144): 
select 'Hello World'
from bug_test
INFO  : Semantic Analysis Completed
INFO  : Returning Hive schema: Schema(fieldSchemas:[FieldSchema(name:_c0, 
type:string, comment:null)], properties:null)
INFO  : Completed compiling 
command(queryId=hive_20191031141030_b97f4ba2-7d18-49b8-a348-8316cc8ae144); Time 
taken: 0.07 seconds
INFO  : Concurrency mode is disabled, not creating a lock manager
INFO  : Executing 
command(queryId=hive_20191031141030_b97f4ba2-7d18-49b8-a348-8316cc8ae144): 
select 'Hello World'
from bug_test
INFO  : Completed executing 
command(queryId=hive_20191031141030_b97f4ba2-7d18-49b8-a348-8316cc8ae144); Time 
taken: 0.0 seconds
INFO  : OK
+------+
| _c0  |
+------+
+------+
No rows selected (0.1 seconds)
>>>
>>>  select c1 -- a comment
, c1 -- another comment
from bug_test;
. . . . . . . . . . . . . . . . . . . .>
. . . . . . . . . . . . . . . . . . . .> Error: Error while compiling 
statement: FAILED: SemanticException [Error 10004]: Line 1:7 Invalid table 
alias or column reference 'c1': (possible column names are: ) 
(state=42000,code=10004)
Aborting command set because "force" is false and command failed: "select c1 -- 
a comment
, c1 -- another comment
from bug_test;"
Closing: 0: jdbc:hive2://localhost:10000/default}}


> Beeline Stops Running Command At Comment
> ----------------------------------------
>
>                 Key: HIVE-22440
>                 URL: https://issues.apache.org/jira/browse/HIVE-22440
>             Project: Hive
>          Issue Type: Bug
>          Components: Beeline, CLI
>            Reporter: Shawn Weeks
>            Priority: Minor
>         Attachments: bug_exec.sql, bug_run.sql
>
>
> This seems to be related to HIVE-13864 but I'm not sure that HIVE-16935 fixes 
> it as the example is different. Please flag as a dupe and close if that's the 
> case.
> If you download the two attached files and run this command it's quits 
> parsing at the comment.
> {{beeline -u jdbc:hive2://localhost:10000 -f ./bug_run.sql}}
> {{ Error: Error while compiling statement: FAILED: SemanticException [Error 
> 10004]: Line 1:7 Invalid table alias or column reference 'c1': (possible 
> column names are: ) (state=42000,code=10004)}}



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

Reply via email to