xuefuz commented on a change in pull request #10231: [FLINK-14711][table] add 
alter and show function ddl
URL: https://github.com/apache/flink/pull/10231#discussion_r347198098
 
 

 ##########
 File path: 
flink-table/flink-sql-parser/src/main/codegen/includes/parserImpls.ftl
 ##########
 @@ -177,6 +177,56 @@ SqlDescribeDatabase SqlDescribeDatabase() :
 
 }
 
+SqlAlterFunction SqlAlterFunction() :
+{
+    SqlIdentifier functionName = null;
+    SqlCharStringLiteral functionClassName = null;
+    SqlCharStringLiteral functionLanguage = null;
+    SqlParserPos startPos;
+    boolean ifExists = false;
+    boolean isSystemFunction = false;
+}
+{
+    <ALTER>
+    <TEMPORARY>
+    (
+        <SYSTEM>   { isSystemFunction = true; }
+    |
+        {isSystemFunction = false; }
+    )
+    <FUNCTION> { startPos = getPos(); }
+    (
+        <IF> <EXISTS> { ifExists = true; }
+    |
+        { ifExists = false; }
+    )
+    functionName = CompoundIdentifier()
+    [ <AS> <QUOTED_STRING> {
+        String p = SqlParserUtil.parseString(token.image);
+        functionClassName = SqlLiteral.createCharString(p, getPos());
+    }]
+    [ <LANGUAGE> <QUOTED_STRING> {
 
 Review comment:
   Not sure if what's our decision on language types, but have a quoted string 
for language seems suggestion user can put anything. One alternative is define 
constant such as SQL, PYTHON, JAVA, etc.

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


With regards,
Apache Git Services

Reply via email to