trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From selvaganesang <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request: [TRAFODION-1453] Improvements in...
Date Thu, 27 Aug 2015 19:11:41 GMT
Github user selvaganesang commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/67#discussion_r38134636
  
    --- 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 --
    
    Ok, I can fix this without the need for cqd by enabling when to look for range delimiter


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