[
https://issues.apache.org/jira/browse/CALCITE-3780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17166285#comment-17166285
]
Viliam Durina commented on CALCITE-3780:
----------------------------------------
Just a note, in the PTF standard the descriptor can have multiple columns (see
chapter 8.15):
{code:none}
<descriptor value constructor> ::=
DESCRIPTOR <left paren> <descriptor column list> <right paren>
<descriptor column list> ::=
<descriptor column specification>
[ { <comma> <descriptor column specification> }... ]
{code}
But it must contain at least one value. I don't think it's a good idea to make
it optional, you would have to always name the next argument `inactive_gap`,
which is not optional. It's not a good idea to have an optional argument in the
middle of arguments list. It's enough to have it nullable.
Also I wonder how will you add a proper PTF support in the future in a
backwards-compatible way. Looks like you're adding polymorphic table functions
without supporting them.
> SESSION Table-valued Function
> -----------------------------
>
> Key: CALCITE-3780
> URL: https://issues.apache.org/jira/browse/CALCITE-3780
> Project: Calcite
> Issue Type: Sub-task
> Reporter: Rui Wang
> Assignee: Rui Wang
> Priority: Major
> Fix For: 1.23.0
>
>
> We can create SESSION table-valued function to replace GROUP BY SESSION for
> inactive gap session functionality:
> {code:sql}
> SELECT *
> FROM TABLE SESSION (
> data => TABLE Bid ,
> timecol => DESCRIPTOR ( bidtime ) ,
> keycol => DESCRIPTOR(key),
> inactive_gap => INTERVAL '10' MINUTES )
> {code}
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)