Github user selvaganesang commented on a diff in the pull request:
https://github.com/apache/trafodion/pull/1522#discussion_r182612555
--- Diff: core/sql/executor/ExHdfsScan.cpp ---
@@ -626,14 +625,23 @@ ExWorkProcRetcode ExHdfsScanTcb::work()
else
extraBytesRead_ = 0;
// headRoom_ is the number of extra bytes to be read
(rangeTailIOSize)
- // If EOF is reached while reading the range and the
extraBytes read
- // is less than headRoom_ then process all the data till EOF
- // TODO: If the whole range fits in one buffer, it is need
too to process rows till EOF for the last range alone
- // No easy way to identify that last range read, but can
identify that it is not the first range.
- // The rows could be read more than once if there are more
than 2 ranges.
- // Fix optimizer not to have more than 2 ranges in that case
- if (retArray_[IS_EOF] && extraBytesRead_ < headRoom_ &&
hdfo->getStartOffset() != 0)
- extraBytesRead_ = 0;
+ // If the whole range fits in one buffer, it is needed to
process rows till EOF for the last range alone.
+/*
--- End diff --
Yes. I can remove it in a later check-in
---