Suresh Subbiah created TRAFODION-2758:
-----------------------------------------
Summary: 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)