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

Rui Wang edited comment on CALCITE-2645 at 11/2/18 5:04 PM:
------------------------------------------------------------

Correct me if I am wrong: in physical implementation, session window will only 
emit one timestamp, which could be either window start or end, but not both. So 
SESSION_END(ts), SESSION_START(ts) will have same value. 

I think the Calcite implementation leaves no room for physical implementation 
to correct SESSION_END(ts). 

 


was (Author: amaliujia):
Correct me if I am wrong: in physical implementation, session window will only 
emit one timestamp, which could be either window start or end, but now both. So 
SESSION_END(ts), SESSION_START(ts) will have same value. 

I think the Calcite implementation leaves no room for physical implementation 
to correct SESSION_END(ts). 

 

> SESSION_END() is transformed to RexInputRef, which is always equal to 
> SESSION_START()
> -------------------------------------------------------------------------------------
>
>                 Key: CALCITE-2645
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2645
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Rui Wang
>            Assignee: Julian Hyde
>            Priority: Major
>
> https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql2rel/AuxiliaryConverter.java#L56
> In the AuxiliaryConverter implementation, SESSION_END() is transformed to a 
> RexInputRef, as the same as SESSION_START(). By doing so, it cannot restored 
> when generating physical plan because it cannot be differentiated which 
> RexInputRef is session start, and which RexInputRef is session end. 
> Ideally, during toRel, SESSION_END can be kept as a RexCall with function 
> information in it. So in the following step, the RexCall can be replaced as a 
> correct input reference to GROUP BY's field.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to