[jira] [Commented] (HIVE-10541) Beeline requires newline at the end of each query in a file
[ https://issues.apache.org/jira/browse/HIVE-10541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14527902#comment-14527902 ] Lefty Leverenz commented on HIVE-10541: --- Okay, thanks [~ctang.ma]. > Beeline requires newline at the end of each query in a file > --- > > Key: HIVE-10541 > URL: https://issues.apache.org/jira/browse/HIVE-10541 > Project: Hive > Issue Type: Bug > Components: Beeline >Affects Versions: 0.13.1 >Reporter: Chaoyu Tang >Assignee: Chaoyu Tang >Priority: Minor > Fix For: 1.3.0 > > Attachments: HIVE-10541.1.patch, HIVE-10541.patch > > > Beeline requires newline at the end of each query in a file. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-10541) Beeline requires newline at the end of each query in a file
[ https://issues.apache.org/jira/browse/HIVE-10541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14526672#comment-14526672 ] Chaoyu Tang commented on HIVE-10541: I think it is not needed. Before, without this patch the last statement in the Beeline sql script was ignored and needed a newline in order to be executed. It is a bug and the workaround by appending a newline was not documented. This JIRA fixes this issue. > Beeline requires newline at the end of each query in a file > --- > > Key: HIVE-10541 > URL: https://issues.apache.org/jira/browse/HIVE-10541 > Project: Hive > Issue Type: Bug > Components: Beeline >Affects Versions: 0.13.1 >Reporter: Chaoyu Tang >Assignee: Chaoyu Tang >Priority: Minor > Fix For: 1.3.0 > > Attachments: HIVE-10541.1.patch, HIVE-10541.patch > > > Beeline requires newline at the end of each query in a file. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-10541) Beeline requires newline at the end of each query in a file
[ https://issues.apache.org/jira/browse/HIVE-10541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14526377#comment-14526377 ] Lefty Leverenz commented on HIVE-10541: --- Does this need to be documented? > Beeline requires newline at the end of each query in a file > --- > > Key: HIVE-10541 > URL: https://issues.apache.org/jira/browse/HIVE-10541 > Project: Hive > Issue Type: Bug > Components: Beeline >Affects Versions: 0.13.1 >Reporter: Chaoyu Tang >Assignee: Chaoyu Tang >Priority: Minor > Fix For: 1.3.0 > > Attachments: HIVE-10541.1.patch, HIVE-10541.patch > > > Beeline requires newline at the end of each query in a file. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-10541) Beeline requires newline at the end of each query in a file
[ https://issues.apache.org/jira/browse/HIVE-10541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14526114#comment-14526114 ] Chaoyu Tang commented on HIVE-10541: Thanks [~thejas] for review and [~szehon] for committing the patch. > Beeline requires newline at the end of each query in a file > --- > > Key: HIVE-10541 > URL: https://issues.apache.org/jira/browse/HIVE-10541 > Project: Hive > Issue Type: Bug > Components: Beeline >Affects Versions: 0.13.1 >Reporter: Chaoyu Tang >Assignee: Chaoyu Tang >Priority: Minor > Fix For: 1.3.0 > > Attachments: HIVE-10541.1.patch, HIVE-10541.patch > > > Beeline requires newline at the end of each query in a file. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-10541) Beeline requires newline at the end of each query in a file
[ https://issues.apache.org/jira/browse/HIVE-10541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14523710#comment-14523710 ] Thejas M Nair commented on HIVE-10541: -- +1 > Beeline requires newline at the end of each query in a file > --- > > Key: HIVE-10541 > URL: https://issues.apache.org/jira/browse/HIVE-10541 > Project: Hive > Issue Type: Bug > Components: Beeline >Affects Versions: 0.13.1 >Reporter: Chaoyu Tang >Assignee: Chaoyu Tang >Priority: Minor > Attachments: HIVE-10541.1.patch, HIVE-10541.patch > > > Beeline requires newline at the end of each query in a file. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-10541) Beeline requires newline at the end of each query in a file
[ https://issues.apache.org/jira/browse/HIVE-10541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14523395#comment-14523395 ] Chaoyu Tang commented on HIVE-10541: The failed test seems not related to this patch. The new added test TestBeeLineWithArgs#testLastLineCmdInScriptFile passed. > Beeline requires newline at the end of each query in a file > --- > > Key: HIVE-10541 > URL: https://issues.apache.org/jira/browse/HIVE-10541 > Project: Hive > Issue Type: Bug > Components: Beeline >Affects Versions: 0.13.1 >Reporter: Chaoyu Tang >Assignee: Chaoyu Tang >Priority: Minor > Attachments: HIVE-10541.1.patch, HIVE-10541.patch > > > Beeline requires newline at the end of each query in a file. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-10541) Beeline requires newline at the end of each query in a file
[ https://issues.apache.org/jira/browse/HIVE-10541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14523350#comment-14523350 ] Hive QA commented on HIVE-10541: {color:red}Overall{color}: -1 at least one tests failed Here are the results of testing the latest attachment: https://issues.apache.org/jira/secure/attachment/12729681/HIVE-10541.1.patch {color:red}ERROR:{color} -1 due to 1 failed/errored test(s), 8882 tests executed *Failed tests:* {noformat} org.apache.hive.jdbc.TestSSL.testSSLVersion {noformat} Test results: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/3682/testReport Console output: http://ec2-174-129-184-35.compute-1.amazonaws.com/jenkins/job/PreCommit-HIVE-TRUNK-Build/3682/console Test logs: http://ec2-174-129-184-35.compute-1.amazonaws.com/logs/PreCommit-HIVE-TRUNK-Build-3682/ Messages: {noformat} Executing org.apache.hive.ptest.execution.PrepPhase Executing org.apache.hive.ptest.execution.ExecutionPhase Executing org.apache.hive.ptest.execution.ReportingPhase Tests exited with: TestsFailedException: 1 tests failed {noformat} This message is automatically generated. ATTACHMENT ID: 12729681 - PreCommit-HIVE-TRUNK-Build > Beeline requires newline at the end of each query in a file > --- > > Key: HIVE-10541 > URL: https://issues.apache.org/jira/browse/HIVE-10541 > Project: Hive > Issue Type: Bug > Components: Beeline >Affects Versions: 0.13.1 >Reporter: Chaoyu Tang >Assignee: Chaoyu Tang >Priority: Minor > Attachments: HIVE-10541.1.patch, HIVE-10541.patch > > > Beeline requires newline at the end of each query in a file. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-10541) Beeline requires newline at the end of each query in a file
[ https://issues.apache.org/jira/browse/HIVE-10541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14522262#comment-14522262 ] Chaoyu Tang commented on HIVE-10541: Thanks [~thejas]. I will look into adding a test case for that. > Beeline requires newline at the end of each query in a file > --- > > Key: HIVE-10541 > URL: https://issues.apache.org/jira/browse/HIVE-10541 > Project: Hive > Issue Type: Bug > Components: Beeline >Affects Versions: 0.13.1 >Reporter: Chaoyu Tang >Assignee: Chaoyu Tang >Priority: Minor > Attachments: HIVE-10541.patch > > > Beeline requires newline at the end of each query in a file. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-10541) Beeline requires newline at the end of each query in a file
[ https://issues.apache.org/jira/browse/HIVE-10541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14522197#comment-14522197 ] Thejas M Nair commented on HIVE-10541: -- [~ctang.ma] thanks for the patch! The fix looks good to me, but I think it could use a simple test case in TestBeeLineWithArgs as well. > Beeline requires newline at the end of each query in a file > --- > > Key: HIVE-10541 > URL: https://issues.apache.org/jira/browse/HIVE-10541 > Project: Hive > Issue Type: Bug > Components: Beeline >Affects Versions: 0.13.1 >Reporter: Chaoyu Tang >Assignee: Chaoyu Tang >Priority: Minor > Attachments: HIVE-10541.patch > > > Beeline requires newline at the end of each query in a file. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-10541) Beeline requires newline at the end of each query in a file
[ https://issues.apache.org/jira/browse/HIVE-10541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14521595#comment-14521595 ] Chaoyu Tang commented on HIVE-10541: Filed a JIRA for this jline2 issue: https://github.com/jline/jline/issues/10 > Beeline requires newline at the end of each query in a file > --- > > Key: HIVE-10541 > URL: https://issues.apache.org/jira/browse/HIVE-10541 > Project: Hive > Issue Type: Bug > Components: Beeline >Affects Versions: 0.13.1 >Reporter: Chaoyu Tang >Assignee: Chaoyu Tang >Priority: Minor > > Beeline requires newline at the end of each query in a file. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HIVE-10541) Beeline requires newline at the end of each query in a file
[ https://issues.apache.org/jira/browse/HIVE-10541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14520778#comment-14520778 ] Chaoyu Tang commented on HIVE-10541: It looks like a bug from jline (jline-2.1.2.jar), class jline.console.ConsoleReader.java method: public String readLine(String prompt, final Character mask) throws IOException {code} int c = pushBackChar.isEmpty() ? readCharacter() : pushBackChar.pop (); if (c == -1) { return null; } {code} When reaching the end of line without \n, readCharacter returns -1 and readLine discard what it has read and return null. so the last command in sql script passed via -f will be ignored. It can be worked around by append a newline after the last sql command. > Beeline requires newline at the end of each query in a file > --- > > Key: HIVE-10541 > URL: https://issues.apache.org/jira/browse/HIVE-10541 > Project: Hive > Issue Type: Bug > Components: Beeline >Affects Versions: 0.13.1 >Reporter: Chaoyu Tang >Assignee: Chaoyu Tang >Priority: Minor > > Beeline requires newline at the end of each query in a file. -- This message was sent by Atlassian JIRA (v6.3.4#6332)