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

    https://github.com/apache/incubator-trafodion/pull/441#discussion_r60524880
  
    --- Diff: core/sql/executor/ExHdfsScan.cpp ---
    @@ -1378,9 +1423,27 @@ ExWorkProcRetcode ExHdfsScanTcb::work()
       
       return WORK_OK;
     }
    +void ExHdfsScanTcb::setR2ColumnNull(Int32 colidx)
    +{
    +  Lng32 neededColIndex = 0;
    +  Attributes * attr = NULL;
    +  ExpTupleDesc * asciiSourceTD = 
hdfsScanTdb().workCriDesc_->getTupleDescriptor(hdfsScanTdb().asciiTuppIndex_);
    +  for (Lng32 i = 0; i <  hdfsScanTdb().convertSkipListSize_; i++)
    +  {
    +    if (hdfsScanTdb().convertSkipList_[i] > 0)
    +    {
    +      attr = asciiSourceTD->getAttr(neededColIndex);
    +      neededColIndex++;
    +     if(attr->getOffset() == colidx)
    +   {
    +           *(short *)&hdfsAsciiSourceData_[attr->getNullIndOffset()] = -1;
    +   }
    +    }
    +  }
    +}
    --- End diff --
    
    I wonder if we need to change it to NULL at line no 1585 when convertExpr() 
returns an error  if the column is nullable and the cqd is set to convert to 
null. It is not clear to me the need for other changes.


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