Skip to content

Commit

Permalink
Fix When there are other sql before the source statement, the source …
Browse files Browse the repository at this point in the history
…statement cannot be executed normally
  • Loading branch information
thomasg19930417 committed Mar 27, 2023
1 parent 1ec0b81 commit a2bfc0f
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.sql.*;
import java.util.*;
import org.apache.hive.beeline.logs.KyuubiBeelineInPlaceUpdateStream;
import org.apache.hive.common.util.HiveStringUtils;
import org.apache.kyuubi.jdbc.hive.KyuubiStatement;
import org.apache.kyuubi.jdbc.hive.Utils;
import org.apache.kyuubi.jdbc.hive.logs.InPlaceUpdateStream;
Expand Down Expand Up @@ -508,7 +507,7 @@ public boolean connect(Properties props) throws IOException {

@Override
public String handleMultiLineCmd(String line) throws IOException {
line = HiveStringUtils.removeComments(line);
int[] startQuote = {-1};
Character mask =
(System.getProperty("jline.terminal", "").equals("jline.UnsupportedTerminal"))
? null
Expand Down Expand Up @@ -539,8 +538,7 @@ public String handleMultiLineCmd(String line) throws IOException {
if (extra == null) { // it happens when using -f and the line of cmds does not end with ;
break;
}
extra = HiveStringUtils.removeComments(extra);
if (extra != null && !extra.isEmpty()) {
if (!extra.isEmpty()) {
line += "\n" + extra;
}
}
Expand Down

0 comments on commit a2bfc0f

Please sign in to comment.