You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/12/19 06:38:38 UTC

[GitHub] [incubator-kyuubi] wForget commented on a diff in pull request #4007: [KYUUBI #4006] Fix the incorrect execution of the source command

wForget commented on code in PR #4007:
URL: https://github.com/apache/incubator-kyuubi/pull/4007#discussion_r1051855505


##########
kyuubi-hive-beeline/src/main/java/org/apache/hive/beeline/KyuubiCommands.java:
##########
@@ -45,7 +45,7 @@ public boolean sql(String line) {
 
   /** Extract and clean up the first command in the input. */
   private String getFirstCmd(String cmd, int length) {
-    return cmd.substring(length);
+    return cmd.substring(length).trim();

Review Comment:
   > This should be to avoid submitting Python code to remove indentation and cause syntax failure.
   
   The `getFirstCmd` method is called only in `sourceFile`, I don't understand why it is affected?



-- 
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: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org