Github user DaveBirdsall commented on a diff in the pull request:

    
https://github.com/apache/incubator-trafodion/pull/1009#discussion_r106024454
  
    --- Diff: core/sql/executor/ExHbaseAccess.cpp ---
    @@ -2634,8 +2634,22 @@ void ExHbaseAccessTcb::allocateDirectRowBufferForJNI(
                                         4 )) // for col value len 
                             + numCols; // 1 byte null value
          maxRowLen  = rowLen + directBufferOverhead;
    -     directRowBufferLen_ = (maxRowLen * maxRows);
    -     directBufferMaxRows_ = maxRows;
    +
    +     // limit direct buffer len to 1G
    +     Int64 tempDirectBuflen = (Int64)maxRowLen * (Int64)maxRows;
    +     Int64 maxDirectBuflen = 1024*1024*1024;
    +
    +     if (tempDirectBuflen > maxDirectBuflen)
    +       {
    +         directRowBufferLen_ = MINOF(tempDirectBuflen, maxDirectBuflen);
    --- End diff --
    
    Could just say directRowBufferLen_ = maxDirectBuflen, since we already know 
maxDirectBufLen is the smallest by virtue of the "if" guard being true.


---
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.
---

Reply via email to