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

    https://github.com/apache/incubator-trafodion/pull/441#discussion_r60572080
  
    --- 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 --
    
    Thanks Selva, I agree, will change it as well. It will support more 
converting cases. If simply select * from hive, convertExpr() will be null. So 
I ignore it. But if one add some cast in the select list, it will be invoked, 
so same logic should apply to it as well.
    I will have an update asap.


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