hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aihua Xu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-11828) beeline -f fails on scripts with tabs between column type and comment
Date Wed, 06 Jan 2016 21:40:39 GMT

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

Aihua Xu commented on HIVE-11828:
---------------------------------

Set the flag CopyPasteDetection for ConsoleReader so JLine will treat <tab> in the file
as regular character rather than for type completion. 

<tab> is kept when executing from the file:

{noformat}
>  $HIVE_HOME/bin/beeline -f ptest  -u "jdbc:hive2://"
0: jdbc:hive2://> create    external table if not exists ptest (
0: jdbc:hive2://> line    string    comment 'test',
0: jdbc:hive2://> dt    string)
0: jdbc:hive2://> STORED AS TEXTFILE;
{noformat}

[~ychena] Can you help review the code?

> beeline -f fails on scripts with tabs between column type and comment
> ---------------------------------------------------------------------
>
>                 Key: HIVE-11828
>                 URL: https://issues.apache.org/jira/browse/HIVE-11828
>             Project: Hive
>          Issue Type: Bug
>          Components: Beeline
>    Affects Versions: 1.2.0
>            Reporter: Krzysztof Adamski
>            Assignee: Aihua Xu
>            Priority: Minor
>         Attachments: HIVE-11828.patch
>
>
> This issue was supposed to be resolved by https://issues.apache.org/jira/browse/HIVE-6359
> However when invoking
>        create table test (id int<tab>COMMENT 'test');
> the following error appears
>  beeline -f test.sql -u"jdbc:hive2://localhost:10000/default;principal=hive/FQDN@US-WEST-2.COMPUTE.INTERNAL"
> scan complete in 4ms
> Connecting to jdbc:hive2://localhost:10000/default;principal=hiveFQDN@US-WEST-2.COMPUTE.INTERNAL
> Connected to: Apache Hive (version 1.1.0-cdh5.4.4)
> Driver: Hive JDBC (version 1.1.0-cdh5.4.4)
> Transaction isolation: TRANSACTION_REPEATABLE_READ
> 0: jdbc:hive2://localhost:10000/default> create table test (id intCOMMENT 'test');
> Error: Error while compiling statement: FAILED: ParseException line 1:22 cannot recognize
input near 'intCOMMENT' ''test'' ')' in column type (state=42000,code=40000)
> There is no problem when <tab> is between the columns e.g. 
>       create table test (id int COMMENT 'test',<tab>id2 string COMMENT 'test2');



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

Mime
View raw message