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

    https://github.com/apache/incubator-trafodion/pull/642#discussion_r73779041
  
    --- Diff: core/sql/optimizer/EncodedKeyValue.cpp ---
    @@ -69,7 +69,14 @@ NAString * getMinMaxValue(TrafDesc * column,
       
       Lng32 buflen = type->getTotalSize();
       char * buf = new char[buflen]; // deleted at the end of this method
    -
    +  if (type->supportsSQLnullPhysical())
    +  {
    +      Lng32 nullHdrSize = type->getSQLnullHdrSize();
    +      for(int i = 0; i < nullHdrSize; i++)
    --- End diff --
    
    Prior to this change, the nullIndictor will be filled by 0 by accident, 
since the minimum value is 0. So it will fill in N zeros into the buffer 
starting from the null header.
    I don't know if it is required for other type. This is a good question, let 
me check other type as well.
    But in fact, this change is not necessary. Since the buf is never used in 
this function.
    
    I will rework on this.


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

Reply via email to