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

Juhwan Kim commented on CALCITE-3296:
-------------------------------------

[~julianhyde] Yes. Here is the link for the 
commit(https://github.com/apache/calcite/commit/11116f6d03bca7cd97d151033c5d82f24394e229).

> Decorrelator gives empty result after decorrelating sort rel with null offset 
> and fetch
> ---------------------------------------------------------------------------------------
>
>                 Key: CALCITE-3296
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3296
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Juhwan Kim
>            Assignee: Juhwan Kim
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> It seems like I introduced a bug with the recent decorrelator patch. Sort rel 
> with null offset and fetch would end up becoming an empty value since 
> decorrelator would call sortLimit builder with 0 limit and 0 offset. It 
> should pass negative values to builder when values are null.
> https://github.com/apache/calcite/blob/e863294ccfbed9dd520c999f75ed0bbe03f9fb1d/core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java#L423



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to