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 #633: [TRAFODION-2119] DDL warning/error if...
Date Tue, 02 Aug 2016 16:10:19 GMT
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/633#discussion_r73186399
  
    --- Diff: core/sql/optimizer/EncodedKeyValue.cpp ---
    @@ -66,15 +66,22 @@ NAString * getMinMaxValue(desc_struct * column,
       if (NAColumn::createNAType(&column->body.columns_desc, NULL, type, NULL))
         return NULL;
       
    -  Lng32 buflen = type->getTotalSize();
    +  Lng32 buflen = type->getTotalSize(); 
       char * buf = new char[buflen]; // deleted at the end of this method
     
    +  if (type->supportsSQLnullPhysical())
    +  {
    +      Lng32 nullHdrSize = type->getSQLnullHdrSize();
    +      buf[0] = buf[1] = '\0';
    --- End diff --
    
    Seems like the code should zero out nullHdrSize bytes (for example, one can use memset,
or alternatively a loop).


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