Github user prashanth-vasudev commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/936#discussion_r98557444
--- Diff: core/sql/generator/GenRelMisc.cpp ---
@@ -3071,7 +3074,16 @@ short Sort::generateTdb(Generator * generator,
sort_options->scratchFreeSpaceThresholdPct() = threshold;
sort_options->sortMaxHeapSize() =
(short)getDefault(SORT_MAX_HEAP_SIZE_MB);
sort_options->mergeBufferUnit() =
(short)getDefault(SORT_MERGE_BUFFER_UNIT_56KB);
+
sort_options->scratchIOBlockSize() =
(Int32)getDefault(SCRATCH_IO_BLOCKSIZE_SORT);
+ if(sortRecLen >= sort_options->scratchIOBlockSize())
+ {
+ Int32 maxScratchIOBlockSize =
(Int32)getDefault(SCRATCH_IO_BLOCKSIZE_SORT_MAX);
+ GenAssert(sortRecLen <= maxScratchIOBlockSize,
+ "sortRecLen is greater than SCRATCH_IO_BLOCKSIZE_SORT_MAX");
+ sort_options->scratchIOBlockSize() = MINOF(sortRecLen * 128,
maxScratchIOBlockSize);
--- End diff --
The Record is already long at this point, the thought here is to atleast
have 128 records in the block. The thought here is to not have 1 record for 1
block.
---
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.
---