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

Naveen Gangam updated HIVE-10087:
---------------------------------
    Attachment: HIVE-10087.patch

The following is the output with the proposed fix with --silent=true and 
--silent=false (query is echoed back)
{code}
$ beeline -u jdbc:hive2://localhost.com:10000/default --showHeader=false 
--silent=true -f query.sql 

+-------------------+--------------------+--+
| true              | t                  |
| false             | f                  |
| TRUE              | T                  |
| FALSE             | F                  |
| ZERO              | 0                  |
+-------------------+--------------------+--+

$ beeline -u jdbc:hive2://localhost:10000/default --showHeader=false 
--silent=false -f query.sql 
0: jdbc:hive2://localhost> select * from booleantest limit 5;
+-------------------+--------------------+--+
| true              | t                  |
| false             | f                  |
| TRUE              | T                  |
| FALSE             | F                  |
| ZERO              | 0                  |
+-------------------+--------------------+--+
5 rows selected (1.087 seconds)
0: jdbc:hive2://localhost> 
Closing: 0: jdbc:hive2://localhost:10000/default
{code}


> Beeline's --silent option should suppress query from being echoed when 
> running with -f option
> ---------------------------------------------------------------------------------------------
>
>                 Key: HIVE-10087
>                 URL: https://issues.apache.org/jira/browse/HIVE-10087
>             Project: Hive
>          Issue Type: Bug
>          Components: Beeline
>    Affects Versions: 0.13.0
>            Reporter: Naveen Gangam
>            Assignee: Naveen Gangam
>            Priority: Minor
>         Attachments: HIVE-10087.patch
>
>
> The {{-e}} and the {{-f}} options behave differently. 
> {code}
> beeline -u jdbc:hive2://localhost:10000/default --showHeader=false 
> --silent=true -f select.sql
> 0: jdbc:hive2://localhost:10000/default> select * from sample_07 limit 5;
> --------------------------------------------------------------------------------------
> 00-0000 All Occupations 134354250 40690
> 11-0000 Management occupations 6003930 96150
> 11-1011 Chief executives 299160 151370
> 11-1021 General and operations managers 1655410 103780
> 11-1031 Legislators 61110 33880
> --------------------------------------------------------------------------------------
> beeline -u jdbc:hive2://localhost:10000/default --showHeader=false 
> --silent=true -e "select * from sample_07 limit 5;"
> --------------------------------------------------------------------------------------
> 00-0000       All Occupations         134354250       40690
> 11-0000       Management occupations  6003930         96150
> 11-1011       Chief executives        299160  151370
> 11-1021       General and operations managers         1655410         103780
> 11-1031       Legislators     61110   33880
> --------------------------------------------------------------------------------------
> {code}



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

Reply via email to