Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-877

Allow ROW as argument to COLLECT

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.5.0
    • None
    • None

    Description

      We would like to build multisets of records, for instance all of the employees in a department:

      SELECT deptno, COLLECT(ROW(ename, salary)) AS emps
      FROM emp
      GROUP BY deptno

      Standard SQL only allows ROW inside a table constructor (i.e. a VALUES clause). A workaround is to create a user-defined type (CREATE TYPE; see http://www.oracle-developer.net/display.php?id=306) but it would be preferable to be able to create rows of anonymous type, so that the above SELECT statement just works.

      Attachments

        Issue Links

          Activity

            People

              julianhyde Julian Hyde
              julianhyde Julian Hyde
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: