turboFei commented on code in PR #4965:
URL: https://github.com/apache/kyuubi/pull/4965#discussion_r1231630324
##########
kyuubi-hive-beeline/src/main/java/org/apache/hive/beeline/KyuubiCommands.java:
##########
@@ -44,24 +45,27 @@ public boolean sql(String line) {
return execute(line, false, false);
}
+ /** For python mode, keep it as it is. */
+ private String trimForNonPythonMode(String line) {
+ return beeLine.isPythonMode() ? line : line.trim();
+ }
+
/** Extract and clean up the first command in the input. */
private String getFirstCmd(String cmd, int length) {
- return cmd.substring(length).trim();
+ return trimForNonPythonMode(cmd.substring(length));
}
private String[] tokenizeCmd(String cmd) {
return cmd.split("\\s+");
}
private boolean isSourceCMD(String cmd) {
- cmd = cmd.trim();
if (cmd == null || cmd.isEmpty()) return false;
Review Comment:
FYI:
https://github.com/apache/kyuubi/pull/4965#issuecomment-1592767770
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]