Github user prashanth-vasudev commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/1081#discussion_r115067125
--- Diff: core/sql/executor/ex_sort.cpp ---
@@ -218,7 +304,8 @@ ExSortTcb::ExSortTcb(const ExSortTdb & sort_tdb,
sortStats_ = NULL;
childTcb_ = &child_tcb;
- CollHeap * space = glob->getSpace();
+ //Create heap to be used by sort.
+ sortHeap_ = new(getHeap()) NAHeap("Sort Heap", (NAHeap *)getHeap(),
204800);
--- End diff --
SortHeap is used to allocate internal data structures to accommodate
initial default number of 1 million records. The hard coded value of 200kb is
the block size hint given to NAheap. This value will help allocations that are
not too big or too small for sort. SortHeap is initialized only at one place
in sort and also this value is not a tune-able parameter , hence kept it as is
and did not make it as a define or cqd.
SORT_MAX_HEAP_SIZE_MB cqd defaults to 800MB , this is the max limit that
will be enforced if quota system is not enforced for sort.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---