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_r347199015
##########
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> {
+ String lang = SqlParserUtil.parseString(token.image);
+ functionLanguage = SqlLiteral.createCharString(lang, getPos());
+ }]
+ {
+ return new SqlAlterFunction(startPos.plus(getPos()), functionName,
functionClassName, functionLanguage, ifExists, isSystemFunction);
+ }
+}
+
+SqlShowFunctions SqlShowFunctions() :
+{
+ SqlIdentifier functionScope = null;
Review comment:
Calling this functionScope might not be actuate. It should be just
"database".
----------------------------------------------------------------
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