And I think both TABLE and DESCRIPTOR are not supported as (table)function
parameters?

TABLE parameter: TABLE(table_name) or TABLE table_name to specify an
input table.
DESCRIPTOR parameter: DESCRIPTOR(column_name, ...) to specify columns from
the input table.


-Rui


On Thu, Aug 29, 2019 at 3:24 PM Rui Wang <[email protected]> wrote:

> Thanks Julian for your explanation and the pointer.
>
> I will go to the direction of TABLE(Function) syntax then.
>
>
> -Rui
>
> On Thu, Aug 29, 2019 at 3:03 PM Julian Hyde <[email protected]> wrote:
>
>> Standard SQL doesn’t allow functions in the FROM clause. I think it’s
>> because tables and functions are in different namespaces (and therefore
>> there could be a table and a function with the same name). So you need to
>> use the TABLE keyword to indicate that you are using a function as a table.
>>
>> This has been discussed before; see
>> https://issues.apache.org/jira/browse/CALCITE-1472?focusedCommentId=15662182&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-15662182
>> <
>> https://issues.apache.org/jira/browse/CALCITE-1472?focusedCommentId=15662182&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15662182
>> >.
>>
>> > On Aug 29, 2019, at 2:37 PM, Rui Wang <[email protected]>
>> wrote:
>> >
>> > Hi Community,
>> >
>> > I have been searching and trying Calcite's query syntax to match
>> > CALCITE-3272 <https://jira.apache.org/jira/browse/CALCITE-3272> (TUBME
>> as a
>> > table function call).
>> >
>> > Currently, the closest syntax in Calcite I found is:
>> >
>> > FROM TABLE(TUMBLE(params...))
>> >
>> > The better syntax should be:
>> >
>> > FROM TUMBLE(params..), which basically is the form of FROM
>> > table_function_name(params...).
>> >
>> >
>> >
>> > Is the second option already supported by Calcite? if not, would it be
>> > better to go to support it?
>> >
>> >
>> > -Rui
>>
>>

Reply via email to