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

Allow table functions without explicit TABLE

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      Currently, per the SQL standard, if you want to use a table function, you need to use the TABLE keyword, like this:

      SELECT * FROM (TABLE myFun(1, 'a'))
      

      In Microsoft SQL Server you can omit the TABLE:

      SELECT * FROM myFun(1, 'a')
      

      This makes the SQL grammar more complicated (and possibly ambiguous, I haven't checked), and makes name-resolution during validation more complicated (tables and table-functions would now occupy the same namespace).

      If we supported this, it would be via a new method in SqlConformance. It would be enabled in the SQL Server conformance, disabled otherwise.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                julianhyde Julian Hyde
                Reporter:
                julianhyde Julian Hyde
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: