You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Haisheng Yuan (Jira)" <ji...@apache.org> on 2019/08/27 20:52:00 UTC

[jira] [Resolved] (CALCITE-3296) Decorrelator gives empty result after decorrelating sort rel with null offset and fetch

     [ https://issues.apache.org/jira/browse/CALCITE-3296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Haisheng Yuan resolved CALCITE-3296.
------------------------------------
    Fix Version/s: 1.21.0
       Resolution: Fixed

Fixed in https://github.com/apache/calcite/commit/70f1453086d67bd6d431d63b93a27baf0cdba06d, thanks for the PR, [~Juhwan]!

> 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
>             Fix For: 1.21.0
>
>          Time Spent: 0.5h
>  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)