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

Allow table functions without explicit TABLE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • 1.37.0
    • None

    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

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

              Dates

                Created:
                Updated:
                Resolved: