Julian Hyde created CALCITE-1490:
------------------------------------

             Summary: Allow table functions without explicit TABLE
                 Key: CALCITE-1490
                 URL: https://issues.apache.org/jira/browse/CALCITE-1490
             Project: Calcite
          Issue Type: Bug
            Reporter: Julian Hyde
            Assignee: Julian Hyde


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

{code}
SELECT * FROM (TABLE myFun(1, 'a'))
{code}

In Microsoft SQL Server you can omit the {{TABLE}}:

{code}
SELECT * FROM myFun(1, 'a')
{code}

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.





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to