trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaveBirdsall <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #936: [TRAFODION-2466]Handle sortReclen lim...
Date Mon, 30 Jan 2017 23:39:22 GMT
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/936#discussion_r98568813
  
    --- 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 --
    
    Not sure I understand. It looks like this code sizes the scratch IO block size to have
at most 128 records (rather than at least).



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message