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

Rui Wang commented on CALCITE-3780:
-----------------------------------

[~jmxie] can you share what use case you have without needing a keycol?


Also I think Villiam was saying optional argument is better to be put after 
non-optional argument. So likely the SESSION signature will be changed to 

 
{code:java}
SELECT *
FROM TABLE SESSION (
  data => TABLE Bid ,
  timecol => DESCRIPTOR ( bidtime ) ,
  inactive_gap => INTERVAL '10' MINUTES ),
  keycol => DESCRIPTOR(key)
{code}

Alternatively, we might consider to use nullability to mark keycol as "not-set" 
(when it is null some how), and in that case argument order might not need a 
change. 

If SQL standard does not allow empty descriptor to describe a  "not-set", then 
keycol() won't be a choice.


> 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)

Reply via email to