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:23:51 UTC

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

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


##########
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.  
   https://github.com/apache/incubator-kyuubi/pull/3762
   
   Wouldn't it be better if we could match different commands to determine trim?
   
   cc @cfmcgrady  @pan3793 



-- 
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