[ 
https://issues.apache.org/jira/browse/CALCITE-3340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16933642#comment-16933642
 ] 

Rui Wang commented on CALCITE-3340:
-----------------------------------

[~julianhyde]

Regarding to one point you mentioned before:


{code:java}
I think you need new TUMBLE and HOP functions. Is it possible to keep the old 
ones and add new ones? The old ones probably don't need to be visible in the 
operator table, because calls to them are created by the parser (explicitly) 
rather than by the validator (looking up by name).
{code}

I am testing if both new and old functions can both exist in operator table. I 
am not sure if I understand the intention of design correctly, but seems like 
built-in function is expected to not be overloaded. Basically it leads to a "no 
function match" if keep both old and new TUMBLE operators (I could give code 
execution details if you are interest in).

Thus I started to explore what you mentioned: "The old ones probably don't need 
to be visible in the operator table". I tried to mark old TUMBLE as private 
static or remove it completely, but they have all failed tests.

Do you have suggestions to how to keep both old and new TUMBLE operators(same 
operator name, same kind)?

> Make TUMBLE be accepted as an operand for "FROM TABLE()" in validator
> ---------------------------------------------------------------------
>
>                 Key: CALCITE-3340
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3340
>             Project: Calcite
>          Issue Type: Sub-task
>            Reporter: Rui Wang
>            Assignee: Rui Wang
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The goal of this JIRA is to generate a logical plan for the following query:
> {code:java}
> SELECT *
> FROM TABLE(TUMBLE(
> TABLE ORDERS,
> INTERVAL '10' MINUTE))
> {code}
> This SQL query does not have DESCRIPTOR included, which is being tracked and 
> discussed by CALCITE-3339.
> I expect we should generate a logical plan from this query that is similar to 
> the following:
> {code:java}
> LogicalProject(ROWTIME=[$0], ID=[$1], PRODUCT=[$2], UNITS=[$3], wstart=[$4], 
> wend=[$5])
>   LogicalTableFunctionScan(invocation=[TUMBLE($3, 60000:INTERVAL MINUTE)], 
> rowType=[RecordType(TIMESTAMP(0) ROWTIME, INTEGER ID, VARCHAR(10) PRODUCT, 
> INTEGER UNITS, TIMESTAMP(0) wstart, TIMESTAMP(0) wend)])
>     LogicalProject(ROWTIME=[$0], ID=[$1], PRODUCT=[$2], UNITS=[$3])
>       LogicalTableScan(table=[[ORINOCO, ORDERS]])
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to