You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Suresh Subbiah (JIRA)" <ji...@apache.org> on 2017/10/03 22:54:00 UTC

[jira] [Resolved] (TRAFODION-2758) Sort operator that uses TopN sort at runtime is not accurately determined at compile time

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

Suresh Subbiah resolved TRAFODION-2758.
---------------------------------------
    Resolution: Fixed

> Sort operator that uses TopN sort at runtime is not accurately determined at compile time
> -----------------------------------------------------------------------------------------
>
>                 Key: TRAFODION-2758
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2758
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-cmp
>    Affects Versions: 2.2-incubating
>            Reporter: Suresh Subbiah
>            Assignee: Suresh Subbiah
>            Priority: Minor
>
> When a query has FIRST N  clause along with an ORDER BY, the resultannt Sort operator is enable to do TopN optimization. The compiler needs to be aware of this so that memory can be shared appropriately between all big memory operators in the query. There are some flaws in the logic the compiler is using to determine if a sort is TopN enabled. Currently the compiler thinks all sort operators in the FirstN query are TopN enabled. This is incorrect, only the first Sort, when traversing the query tree downwards from FirstN will be enabled for this optimization, and that too with certain restrictions.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)