Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-13741

"SHOW FUNCTIONS" should include Flink built-in functions' names

    XMLWordPrintableJSON

    Details

      Description

      Currently "SHOW FUNCTIONS;" only returns catalog functions and FunctionDefinitions registered in memory, but does not include Flink built-in functions' names.

      AFAIK, it's standard for "SHOW FUNCTIONS;" to show all available functions for use in queries in SQL systems like Hive, Presto, Teradata, etc, thus it includes built-in functions naturally. Besides, FunctionCatalog.lookupFunction(name) resolves calls to built-in functions, it's not feeling right to not displaying functions but can successfully resolve to them.

      It seems to me that the root cause is the call stack for "SHOW FUNCTIONS;" has been a bit messy - it calls tEnv.listUserDefinedFunctions() which further calls FunctionCatalog.getUserDefinedFunctions(), and I'm not sure what's the intention of those two APIs. Are they dedicated to getting all functions, or just user defined functions excluding built-in ones?

      In the end, I believe "SHOW FUNCTIONS;" should display built-in functions. To achieve that, we either need to modify and/or rename existing APIs mentioned above, or add new APIs to return all functions from FunctionCatalog.

      cc Xuefu Zhang Rui Li Timo Walther

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                phoenixjiangnan Bowen Li
                Reporter:
                phoenixjiangnan Bowen Li
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m