[
https://issues.apache.org/jira/browse/TRAFODION-2259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15546961#comment-15546961
]
ASF GitHub Bot commented on TRAFODION-2259:
-------------------------------------------
Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/743#discussion_r81870441
--- Diff: core/sql/sort/Record.cpp ---
@@ -55,11 +55,23 @@ Record::Record(ULng32 size, NABoolean doNotallocRec,
CollHeap* heap)
}
}
+Record::Record(void *rec, ULng32 reclen, void* tupp, CollHeap* heap,
SortError* sorterror)
+{
+ recSize_ = reclen;
--- End diff --
There are some indentation problems that make some of the code hard to
read. If you're using tabs, set your editor to replace with spaces.
> Sort TopN operator
> ------------------
>
> Key: TRAFODION-2259
> URL: https://issues.apache.org/jira/browse/TRAFODION-2259
> Project: Apache Trafodion
> Issue Type: Improvement
> Components: sql-exe
> Affects Versions: 2.1-incubating
> Reporter: Prashanth Vasudev
> Assignee: Prashanth Vasudev
>
> Sort operator consumes all records before producing sorted records. For
> certain use cases where only Top N records are required, today sort consumes
> all records into memory and overflows( spills ) to disk. This impacts
> performance.
> if topN is pushed down to sort, only required memory can be allocated and
> sort would only hold topN records in memory. Once all the records are read,
> sorted records in topN is returned.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)