luoyuxia commented on code in PR #22903: URL: https://github.com/apache/flink/pull/22903#discussion_r1250384769
########## docs/content/docs/dev/table/sql/show.md: ########## @@ -759,13 +759,23 @@ Show create view statement for specified view. ## SHOW FUNCTIONS ```sql -SHOW [USER] FUNCTIONS +SHOW [USER] FUNCTIONS [ ( FROM | IN ) [catalog_name.]database_name ] [ [NOT] (LIKE | ILIKE) <sql_like_pattern> ] ``` -Show all functions including system functions and user-defined functions in the current catalog and current database. +Show all functions including system functions and user-defined functions for an optionally specified database. If no database is specified then the functions are returned from the current database. Additionally, the output of this statement may be filtered by an optional matching pattern. **USER** -Show only user-defined functions in the current catalog and current database. +Show only user-defined functions for an optionally specified database. If no database is specified then the functions are returned from the current database. Additionally, the output of this statement may be filtered by an optional matching pattern. + +**LIKE** +Show all tables with given table name and optional `LIKE` clause, whose name is whether similar to the `<sql_like_pattern>`. Review Comment: ```suggestion Show all functions with a `LIKE` clause, whose name is similar to the `<sql_like_pattern>`. ``` ########## docs/content/docs/dev/table/sql/show.md: ########## @@ -759,13 +759,23 @@ Show create view statement for specified view. ## SHOW FUNCTIONS ```sql -SHOW [USER] FUNCTIONS +SHOW [USER] FUNCTIONS [ ( FROM | IN ) [catalog_name.]database_name ] [ [NOT] (LIKE | ILIKE) <sql_like_pattern> ] ``` -Show all functions including system functions and user-defined functions in the current catalog and current database. +Show all functions including system functions and user-defined functions for an optionally specified database. If no database is specified then the functions are returned from the current database. Additionally, the output of this statement may be filtered by an optional matching pattern. **USER** -Show only user-defined functions in the current catalog and current database. +Show only user-defined functions for an optionally specified database. If no database is specified then the functions are returned from the current database. Additionally, the output of this statement may be filtered by an optional matching pattern. + +**LIKE** +Show all tables with given table name and optional `LIKE` clause, whose name is whether similar to the `<sql_like_pattern>`. + +The syntax of sql pattern in `LIKE` clause is the same as that of `MySQL` dialect. Review Comment: ```suggestion The syntax of the SQL pattern in the `LIKE` clause is the same as that of the `MySQL` dialect. ``` ########## docs/content/docs/dev/table/sql/show.md: ########## @@ -759,13 +759,23 @@ Show create view statement for specified view. ## SHOW FUNCTIONS ```sql -SHOW [USER] FUNCTIONS +SHOW [USER] FUNCTIONS [ ( FROM | IN ) [catalog_name.]database_name ] [ [NOT] (LIKE | ILIKE) <sql_like_pattern> ] ``` -Show all functions including system functions and user-defined functions in the current catalog and current database. +Show all functions including system functions and user-defined functions for an optionally specified database. If no database is specified then the functions are returned from the current database. Additionally, the output of this statement may be filtered by an optional matching pattern. **USER** -Show only user-defined functions in the current catalog and current database. +Show only user-defined functions for an optionally specified database. If no database is specified then the functions are returned from the current database. Additionally, the output of this statement may be filtered by an optional matching pattern. + +**LIKE** +Show all tables with given table name and optional `LIKE` clause, whose name is whether similar to the `<sql_like_pattern>`. + +The syntax of sql pattern in `LIKE` clause is the same as that of `MySQL` dialect. +* `%` matches any number of characters, even zero characters, `\%` matches one `%` character. +* `_` matches exactly one character, `\_` matches one `_` character. + +**ILIKE** +The same behavior as `LIKE` but sql pattern is case-insensitive. Review Comment: ```suggestion The same behavior as `LIKE` but the SQL pattern is case-insensitive. ``` ########## docs/content/docs/dev/table/sql/show.md: ########## @@ -759,13 +759,23 @@ Show create view statement for specified view. ## SHOW FUNCTIONS ```sql -SHOW [USER] FUNCTIONS +SHOW [USER] FUNCTIONS [ ( FROM | IN ) [catalog_name.]database_name ] [ [NOT] (LIKE | ILIKE) <sql_like_pattern> ] ``` -Show all functions including system functions and user-defined functions in the current catalog and current database. +Show all functions including system functions and user-defined functions for an optionally specified database. If no database is specified then the functions are returned from the current database. Additionally, the output of this statement may be filtered by an optional matching pattern. **USER** -Show only user-defined functions in the current catalog and current database. +Show only user-defined functions for an optionally specified database. If no database is specified then the functions are returned from the current database. Additionally, the output of this statement may be filtered by an optional matching pattern. + +**LIKE** +Show all tables with given table name and optional `LIKE` clause, whose name is whether similar to the `<sql_like_pattern>`. + +The syntax of sql pattern in `LIKE` clause is the same as that of `MySQL` dialect. +* `%` matches any number of characters, even zero characters, `\%` matches one `%` character. Review Comment: ```suggestion * `%` matches any number of characters, even zero characters, and `\%` matches one `%` character. ``` ########## docs/content/docs/dev/table/sql/show.md: ########## @@ -759,13 +759,23 @@ Show create view statement for specified view. ## SHOW FUNCTIONS ```sql -SHOW [USER] FUNCTIONS +SHOW [USER] FUNCTIONS [ ( FROM | IN ) [catalog_name.]database_name ] [ [NOT] (LIKE | ILIKE) <sql_like_pattern> ] ``` -Show all functions including system functions and user-defined functions in the current catalog and current database. +Show all functions including system functions and user-defined functions for an optionally specified database. If no database is specified then the functions are returned from the current database. Additionally, the output of this statement may be filtered by an optional matching pattern. Review Comment: ```suggestion Show all functions including system functions and user-defined functions for an optionally specified database. If no database is specified then the functions are returned from the current database. Additionally, a `sql_like_pattern` can be used to filter the functions. ``` ########## docs/content.zh/docs/dev/table/sql/show.md: ########## @@ -759,13 +759,23 @@ SHOW CREATE VIEW [catalog_name.][db_name.]view_name ## SHOW FUNCTIONS ```sql -SHOW [USER] FUNCTIONS +SHOW [USER] FUNCTIONS [ ( FROM | IN ) [catalog_name.]database_name ] [ [NOT] (LIKE | ILIKE) <sql_like_pattern> ] ``` -展示当前 catalog 和当前 database 中所有的 function,包括:系统 function 和用户定义的 function。 +展示当前 catalog 和当前 database 中所有的 function,包括:系统 function 和用户定义的 function, 另外返回的结果能被一个可选的匹配字符串过滤。 **USER** -仅仅展示当前 catalog 和当前 database 中用户定义的 function。 +展示当前 catalog 和当前 database 中仅用户定义的 function, 另外返回的结果能被一个可选的匹配字符串过滤。 + +**LIKE** +根据可选的 `LIKE` 语句与 `<sql_like_pattern>` 是否模糊匹配的所有 function。 + +`LIKE` 子句中 sql 正则式的语法与 `MySQL` 方言中的语法相同。 Review Comment: ```suggestion `LIKE` 子句中 SQL 正则式的语法与 `MySQL` 方言中的语法相同。 ``` ########## docs/content.zh/docs/dev/table/sql/show.md: ########## @@ -759,13 +759,23 @@ SHOW CREATE VIEW [catalog_name.][db_name.]view_name ## SHOW FUNCTIONS ```sql -SHOW [USER] FUNCTIONS +SHOW [USER] FUNCTIONS [ ( FROM | IN ) [catalog_name.]database_name ] [ [NOT] (LIKE | ILIKE) <sql_like_pattern> ] ``` -展示当前 catalog 和当前 database 中所有的 function,包括:系统 function 和用户定义的 function。 +展示当前 catalog 和当前 database 中所有的 function,包括:系统 function 和用户定义的 function, 另外返回的结果能被一个可选的匹配字符串过滤。 **USER** -仅仅展示当前 catalog 和当前 database 中用户定义的 function。 +展示当前 catalog 和当前 database 中仅用户定义的 function, 另外返回的结果能被一个可选的匹配字符串过滤。 Review Comment: ```suggestion 仅展示用户定义的 function, 另外返回的结果能被一个可选的匹配字符串过滤。 ``` ########## docs/content.zh/docs/dev/table/sql/show.md: ########## @@ -759,13 +759,23 @@ SHOW CREATE VIEW [catalog_name.][db_name.]view_name ## SHOW FUNCTIONS ```sql -SHOW [USER] FUNCTIONS +SHOW [USER] FUNCTIONS [ ( FROM | IN ) [catalog_name.]database_name ] [ [NOT] (LIKE | ILIKE) <sql_like_pattern> ] ``` -展示当前 catalog 和当前 database 中所有的 function,包括:系统 function 和用户定义的 function。 +展示当前 catalog 和当前 database 中所有的 function,包括:系统 function 和用户定义的 function, 另外返回的结果能被一个可选的匹配字符串过滤。 **USER** -仅仅展示当前 catalog 和当前 database 中用户定义的 function。 +展示当前 catalog 和当前 database 中仅用户定义的 function, 另外返回的结果能被一个可选的匹配字符串过滤。 Review Comment: Also, don't forget to add a part for `( FROM | IN )` which is used to specify to show from which database. Or you can refer in the following statement: ``` 展示当前 catalog 和当前 database 中所有的 function,包括:系统 function 和用户定义的 function, 另外返回的结果能被一个可选的匹配字符串过滤。 ``` ########## docs/content/docs/dev/table/sql/show.md: ########## @@ -759,13 +759,23 @@ Show create view statement for specified view. ## SHOW FUNCTIONS ```sql -SHOW [USER] FUNCTIONS +SHOW [USER] FUNCTIONS [ ( FROM | IN ) [catalog_name.]database_name ] [ [NOT] (LIKE | ILIKE) <sql_like_pattern> ] ``` -Show all functions including system functions and user-defined functions in the current catalog and current database. +Show all functions including system functions and user-defined functions for an optionally specified database. If no database is specified then the functions are returned from the current database. Additionally, the output of this statement may be filtered by an optional matching pattern. **USER** -Show only user-defined functions in the current catalog and current database. +Show only user-defined functions for an optionally specified database. If no database is specified then the functions are returned from the current database. Additionally, the output of this statement may be filtered by an optional matching pattern. Review Comment: ```suggestion Show only user-defined functions for an optionally specified database. If no database is specified then the functions are returned from the current database. Additionally, a `sql_like_pattern` can be used to filter the functions. ``` -- 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]
