pgaref commented on a change in pull request #2639:
URL: https://github.com/apache/hive/pull/2639#discussion_r712189151
##########
File path:
ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestOrcFileStripeMergeRecordReader.java
##########
@@ -63,8 +63,20 @@ public void testSplitStartsWithOffset() throws IOException {
FileSplit split = new FileSplit(tmpPath, offset, length, (String[])null);
OrcFileStripeMergeRecordReader reader = new
OrcFileStripeMergeRecordReader(conf, split);
reader.next(key, value);
+ // since offset is non-zero this file will not be processed.
+ Assert.assertNull(key.getInputPath());
+ split = new FileSplit(tmpPath, 0, length, (String[]) null);
Review comment:
Offset is actually Zero here -- what am I missing?
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/io/orc/OrcFileStripeMergeRecordReader.java
##########
@@ -80,7 +80,7 @@ public boolean next(OrcFileKeyWrapper key,
OrcFileValueWrapper value) throws IOE
}
protected boolean nextStripe(OrcFileKeyWrapper keyWrapper,
OrcFileValueWrapper valueWrapper)
- throws IOException {
+ throws IOException {
// missing stripe stats (old format). If numRows is 0 then its an empty
file and no statistics
// is present. We have to differentiate no stats (empty file) vs missing
stats (old format).
if ((stripeStatistics == null || stripeStatistics.isEmpty()) &&
reader.getNumberOfRows() > 0) {
Review comment:
would it make sense to have the ```start > 0``` check here instead?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]