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

    https://github.com/apache/incubator-trafodion/pull/550#discussion_r67721659
  
    --- Diff: core/sql/executor/ExHbaseAccess.cpp ---
    @@ -1153,6 +1153,32 @@ Lng32 
ExHbaseAccessTcb::createSQRowFromHbaseFormat(Int64 *latestRowTimestamp)
                  ex_assert(FALSE, "Attr not found -2");
          
          char * defVal = attr->getDefaultValue();
    +          if (! defVal)
    +            {
    +              char * colVal = (char*)
    +                hbaseAccessTdb().listOfFetchedColNames()->get(idx);
    +
    +              Text colFam, colName;
    +              extractColFamilyAndName(colVal, colFam, colName);
    +
    +              Int64 v = 0;
    +              if (colName.length() == sizeof(char))
    +                v = *(char*)colName.data();
    +              else if (colName.length() == sizeof(unsigned short))
    +                v = *(UInt16*)colName.data();
    +              else if (colName.length() == sizeof(Lng32))
    +                v = *(ULng32*)colName.data();
    +
    +              char buf[10];
    --- End diff --
    
    2^30 = 1073741824, which is one byte too big to fit in buf (since you need 
room for a null terminator). We are unlikely to see that many columns, but 
still would be nice to make buf 11 bytes 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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to