David Wayne Birdsall created TRAFODION-2924:
-----------------------------------------------
Summary: Refactor FirstN handling for queries using output rowsets
Key: TRAFODION-2924
URL: https://issues.apache.org/jira/browse/TRAFODION-2924
Project: Apache Trafodion
Issue Type: Bug
Components: sql-cmp
Affects Versions: 2.3
Reporter: David Wayne Birdsall
Assignee: David Wayne Birdsall
The FirstN logic has some hacks in it. When no ORDER BY is present, the Binder
is quite happy to generate the FirstN node. But if ORDER BY is present, it is
deferred to Generator time to skirt some unsolved design issues. But this
creates other problems, such as the problem that Jira TRAFODION-2840 tries to
solve. That Jira refactored the FirstN/ORDER BY logic so that now the Binder
creates the FirstN node for most SELECT queries.
The one exception is SELECT queries using output rowsets and FirstN and ORDER
BY. Fixing that code path proved a bit of a challenge (mostly because of the
logistics of creating a test example), and it isn't needed to solve the issue
in Jira TRAFODION-2840 since output rowsets do not occur in view definitions.
Nevertheless, it is still desireable to complete the refactoring of FirstN. In
principle, we want it handled the same way always so that semantic checks and
operations that occur before Generator time do not need to be designed and
coded in two completely different ways based on whether ORDER BY is present or
not. So, this Jira is written to cover that task.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)