You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by GitBox <gi...@apache.org> on 2019/11/07 17:11:41 UTC

[GitHub] [samza] shanthoosh commented on a change in pull request #1214: SAMZA-2375, SAMZA-2376: Add display name to UdfMetadata and handle trailing semi-colons

shanthoosh commented on a change in pull request #1214: SAMZA-2375, SAMZA-2376: Add display name to UdfMetadata and handle trailing semi-colons
URL: https://github.com/apache/samza/pull/1214#discussion_r343769920
 
 

 ##########
 File path: samza-sql/src/main/java/org/apache/samza/sql/util/SamzaSqlQueryParser.java
 ##########
 @@ -101,6 +101,8 @@ public String getSql() {
   public static QueryInfo parseQuery(String sql) {
     Planner planner = createPlanner();
     SqlNode sqlNode;
+    // Remove trailing semi-colons
+    sql = sql.replaceAll(";+$", "");
 
 Review comment:
   Would be great if we can extract the regex to match the semi-colon into a appropriately named constant to improve readability.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services