godfreyhe commented on a change in pull request #12188:
URL: https://github.com/apache/flink/pull/12188#discussion_r426141169



##########
File path: 
flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/cli/SqlCommandParser.java
##########
@@ -34,29 +58,131 @@ private SqlCommandParser() {
                // private
        }
 
-       public static Optional<SqlCommandCall> parse(String stmt) {
+       public static Optional<SqlCommandCall> parse(Function<String, 
List<Operation>> sqlParserFunction, String stmt) {
                // normalize
                stmt = stmt.trim();

Review comment:
       for the `SqlCommandParser` users, they do not need to know how to parse 
a statement, so I think we should only provide one entry point method. I can 
extract the regex matching part into a method. for `sqlParserFunction`, how 
about pass it into `SqlCommandParser` through constructor, that means we should 
make `parse` method as a non-static method ?




----------------------------------------------------------------
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:
[email protected]


Reply via email to