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 #889: [TRAFODION-2408] Changes to support "...
Date Tue, 03 Jan 2017 18:26:26 GMT
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/889#discussion_r94454952
  
    --- Diff: core/sql/optimizer/SynthType.cpp ---
    @@ -6699,16 +6699,20 @@ const NAType *LOBoper::synthesizeType()
     const NAType *LOBinsert::synthesizeType()
     {
       // Return blob type
    -
    -  ValueId vid1 = child(0)->getValueId();
    -  const NAType &typ1 = (NAType&)vid1.getType();
    +  ValueId vid1;
    +  const NAType *typ1 = NULL;
    +  if (child(0))
    +    {
    +      vid1 = child(0)->getValueId();
    +      typ1 = &vid1.getType();
    +    }
     
       if ((obj_ == STRING_) ||
           (obj_ == FILE_) ||
           (obj_ == EXTERNAL_) ||
           (obj_ == LOAD_))
         {
    -      if (typ1.getTypeQualifier() != NA_CHARACTER_TYPE)
    +      if (typ1->getTypeQualifier() != NA_CHARACTER_TYPE)
    --- End diff --
    
    Could typ1 be null here? (Looks like it will be if child(0) is null.) Should we check
for 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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message