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

    https://github.com/apache/incubator-trafodion/pull/67#discussion_r38118468
  
    --- Diff: core/sql/executor/ExHdfsScan.cpp ---
    @@ -1427,24 +1424,28 @@ char * 
ExHdfsScanTcb::extractAndTransformAsciiSourceToSqlRow(int &err,
           else
             attr = NULL;
      
    -      if (!isTrailingMissingColumn)
    -        sourceColEnd = strchr(sourceData, delimiter);
    -
    -      if(!isTrailingMissingColumn)
    -   {
    -          short len = 0;
    -     if (sourceColEnd  &&
    -         sourceColEnd <= sourceDataEnd)
    -       len = sourceColEnd - sourceData;
    -     else
    -            { 
    -              len = sourceDataEnd - sourceData;
    -              if (i != hdfsScanTdb().convertSkipListSize_ - 1)
    -                isTrailingMissingColumn = TRUE;
    -            }
    -
    -          if (attr) // this is a needed column. We need to convert
    -          {
    +      if (!isTrailingMissingColumn) {
    +         sourceColEnd = hdfs_strchr(sourceData, rd, cd, sourceDataEnd, 
&rdSeen);
    +         if (sourceColEnd == NULL) {
    +            if (rdSeen || (sourceRowEnd == NULL))
    +               return NULL;
    +            else
    +               return sourceRowEnd+1;
    +         }
    +         short len = 0;
    +    len = sourceColEnd - sourceData;
    +         if (rdSeen) {
    +            sourceRowEnd = sourceColEnd; 
    +            hdfsLoggingRowEnd_  = sourceRowEnd;
    +            if ((endOfRequestedRange_) && 
    +                (sourceRowEnd >= endOfRequestedRange_))
    +                   *(sourceRowEnd +1)= RANGE_DELIMITER;
    --- End diff --
    
    I am nervous about adding to table data. What will happen  if is '\002' in 
table data? If we are assuming that '\002' will not be present, can you please 
add a cqd or something that will allow us to change the RANGE_DELIMITER to 
something else if necessary. If you agree, subsequent checkin will be good.


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