chucheng92 commented on code in PR #22903:
URL: https://github.com/apache/flink/pull/22903#discussion_r1250315988
##########
flink-table/flink-sql-parser/src/main/codegen/includes/parserImpls.ftl:
##########
@@ -437,21 +437,54 @@ SqlAlterFunction SqlAlterFunction() :
/**
* Parses a show functions statement.
-* SHOW [USER] FUNCTIONS;
+* SHOW [USER] FUNCTIONS [ ( FROM | IN ) [catalog_name.]database_name ] [ [NOT]
(LIKE | ILIKE) pattern;
*/
SqlShowFunctions SqlShowFunctions() :
{
SqlParserPos pos;
boolean requireUser = false;
+ String prep = null;
+ SqlIdentifier databaseName = null;
+ String likeType = null;
+ SqlCharStringLiteral likeLiteral = null;
+ boolean notLike = false;
}
{
<SHOW> { pos = getPos();}
[
<USER> { requireUser = true; }
]
<FUNCTIONS>
+ [
+ ( <FROM> { prep = "FROM"; } | <IN> { prep = "IN"; } )
+ { pos = getPos(); }
+ databaseName = CompoundIdentifier()
+ ]
+ [
+ [
+ <NOT>
+ {
+ notLike = true;
+ }
+ ]
+ (
+ <LIKE> <QUOTED_STRING>
+ {
+ likeType = "LIKE";
+ String likeCondition1 = SqlParserUtil.parseString(token.image);
Review Comment:
good point. fixed
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]