SHOW FUNCTIONS

    • function_kind

      • USER - Looks up the function(s) among the user defined functions.
      • SYSTEM - Looks up the function(s) among the system defined functions.
      • ALL - Looks up the function(s) among both user and system defined functions.
    • { FROM | IN } database_name

    • regex_pattern

      • Except for * and | character, the pattern works like a regular expression.
      • * alone matches 0 or more characters and | is used to separate multiple different regular expressions, any of which can match.
      • The leading and trailing blanks are trimmed in the input pattern before processing. The pattern match is case-insensitive.
    1. -- List a system function `trim` by searching both user defined and system
    2. -- defined functions.
    3. SHOW FUNCTIONS trim;
    4. +--------+
    5. |function|
    6. +--------+
    7. | trim|
    8. +--------+
    9. -- List a system function `concat` by searching system defined functions.
    10. SHOW SYSTEM FUNCTIONS concat;
    11. +--------+
    12. +--------+
    13. | concat|
    14. +--------+
    15. -- List a qualified function `max` from database `salesdb`.
    16. +--------+
    17. |function|
    18. +--------+
    19. | max|
    20. +--------+
    21. -- List all functions starting with `t`
    22. SHOW FUNCTIONS LIKE 't*';
    23. +-----------------+
    24. | function|
    25. +-----------------+
    26. | tan|
    27. | tanh|
    28. | timestamp|
    29. | tinyint|
    30. | to_csv|
    31. | to_date|
    32. | to_json|
    33. | to_timestamp|
    34. |to_unix_timestamp|
    35. | transform|
    36. | transform_keys|
    37. | translate|
    38. | trim|
    39. | trunc|
    40. | typeof|
    41. +-----------------+
    42. -- List all functions starting with `yea` or `windo`
    43. SHOW FUNCTIONS LIKE 'yea*|windo*';
    44. +--------+
    45. |function|
    46. +--------+
    47. | window|
    48. | year|
    49. +--------+
    50. -- Use normal regex pattern to list function names that has 4 characters
    51. -- with `t` as the starting character.
    52. SHOW FUNCTIONS LIKE 't[a-z][a-z][a-z]';
    53. +--------+
    54. |function|
    55. +--------+
    56. | tanh|
    57. | trim|