[ https://issues.apache.org/jira/browse/HIVE-14389?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16005669#comment-16005669 ]
Vihang Karajgaonkar commented on HIVE-14389: -------------------------------------------- Thanks for the review [~pvary]. I manually tested against the test cases in HIVE-14525 like you pointed and they seem to be working fine. Here is the output of the test cases {noformat} vihang-MBP:bin vihang$ cat /tmp/test.sql select * from names; vihang-MBP:bin vihang$ beeline --showheader=false --outputformat=tsv2 >stdout 2>stderr -f /tmp/test.sql 1>stdout 2>stderr vihang-MBP:bin vihang$ vihang-MBP:bin vihang$ vihang-MBP:bin vihang$ cat stdout 1 John 2 Jack 3 Tom 4 Jerry {noformat} {noformat} vihang-MBP:bin vihang$ echo -e 'select\n"foo",\n"bar"' | beeline --showheader=false --outputformat=tsv2 >stdout 2>stderr vihang-MBP:bin vihang$ cat stdout foo bar {noformat} {noformat} vihang-MBP:bin vihang$ ssh localhost test1.sh Running bash_profile vihang-MBP:bin vihang$ vihang-MBP:bin vihang$ cat stdout foo bar vihang-MBP:bin vihang$ {noformat} For the second comment regarding Pattern.CASE_INSENSITIVE, I think I misunderstood the test. I have reverted that part of the change. I realized that {{" nonEscapedSemiColon "}} is needs to be compared from the query text part of the code instead of query result. With this patch the query text will be moved to stderr and hence we need to look for that text in the STDERR. Thanks for catching that! > Beeline should not output query and prompt to stdout > ---------------------------------------------------- > > Key: HIVE-14389 > URL: https://issues.apache.org/jira/browse/HIVE-14389 > Project: Hive > Issue Type: Improvement > Components: Beeline > Reporter: Vihang Karajgaonkar > Assignee: Vihang Karajgaonkar > Priority: Minor > Attachments: HIVE-14389.01.patch, HIVE-14389.02.patch, > HIVE-14389.03.patch > > > It seems that the Beeline prints the query along with the results in the > stdout when a script file is passed. The output file in the example below > needs to only have the results and not the query. > {noformat} > .vihang-MBP:bin vihang$ ./beeline --showheader=false --outformat=tsv2 -u > "jdbc:hive2://localhost:10000" -f /tmp/query.sql > /tmp/query.out 2> > /tmp/query.err > OK > $ cat /tmp/query.out > 1: jdbc:hive2://localhost:10000/default> select * from likes limit 4; > +-----------+--------------+--+ > | 1 | chocolate | > | 1 | car | > | 1 | games | > | 1 | chess | > +-----------+--------------+--+ > 1: jdbc:hive2://localhost:10000/default> > 1: jdbc:hive2://localhost:10000/default> > $ > {noformat} > A lot of people use HiveCLI and in order to transition from HiveCLI scripts > to Beeline, this needs to be taken care of. The output files generated by > beeline should contain only the results and nothing else. > Similarly, when not in silent mode, query are being printed out on stdout, > which is adding garbage along with results, as just like HIVE CLI does, users > would like to have only the results on stdout, not errors/debugging info/etc, > like the full query. > Query could be printed out, no problem, as long as it is not on stdout (with > results), instead, it must be printed out along with the debugging info. -- This message was sent by Atlassian JIRA (v6.3.15#6346)