Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-28849

I_S tables don't tell that the stored function is AGGREGATE

    XMLWordPrintable

Details

    Description

      INFORMATION_SCHEMA.ROUTINES does not tell whether a particular storage function is aggregate or not.

      How can we show it? Let's also think how it can be extended to work for window functions later. Options are:

      new ROUTINE_TYPE

      The standard defines it as

      ROUTINE_TYPE INFORMATION_SCHEMA.CHARACTER_DATA NOT NULL
          CHECK ( ROUTINE_TYPE IN ( 'PROCEDURE', 'FUNCTION', 'INSTANCE METHOD', 'STATIC METHOD', 'CONSTRUCTOR METHOD' ) ),
      

      we can add 'AGGREGATE FUNCTION' to the list. And 'WINDOW FUNCTION' later.

      new field IS_AGGREGATE

      the standard ROUTINE table has many fields like

      IS_DETERMINISTIC INFORMATION_SCHEMA.YES_OR_NO,
      IS_NULL_CALL INFORMATION_SCHEMA.YES_OR_NO,
      IS_USER_DEFINED_CAST INFORMATION_SCHEMA.YES_OR_NO,
      IS_IMPLICITLY_INVOCABLE INFORMATION_SCHEMA.YES_OR_NO,
      

      so IS_AGGREGATE would be quite in line with that. Window functions, though, will need yet another column.

      new field FUNCTION_KIND (or something like that)

      the standard ROUTINE table has numerous ENUM-like fields (e.g. ROUTINE_TYPE). Another ENUM-like field with values ENUM('NORMAL', 'AGGREGATE') will not look too strange. 'WINDOW' can later be added easily.

      Attachments

        Issue Links

          Activity

            People

              nikitamalyavin Nikita Malyavin
              serg Sergei Golubchik
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.