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 [email protected] or file a JIRA ticket
with INFRA.
---