sumihehe opened a new issue #2346:
URL: https://github.com/apache/hudi/issues/2346
Hi all,
The rt view query returns a wrong result with predicate push down.
This is my query on a rt view of MOR table:
select count(1) from ***mor_rt where platform = "HYLOOP" and
`_hoodie_commit_time`= '20201210213000';
| _c0 |
| -- |
0
But it do have records whose `_hoodie_commit_time` equal '20201210213000',
it can be proved by the result of query:
select `_hoodie_commit_time`, count(1) from ***mor_rt where platform =
"HYLOOP" group by `_hoodie_commit_time`;
_hoodie_commit_time | _c1
-- | --
20201210213000 | 16
I think it may be a bug and is caused by the wrong code logic in
HoodieCombineRealtimeRecordReader .
```java
public boolean next(NullWritable key, ArrayWritable value) throws
IOException {
if (this.currentRecordReader.next(key, value)) {
LOG.info("Reading from record reader");
LOG.info(HoodieRealtimeRecordReaderUtils.arrayWritableToString(value));
return true;
} else if (recordReaders.size() > 0) {
this.currentRecordReader.close();
this.currentRecordReader = recordReaders.remove(0);
return this.currentRecordReader.next(key, value); //TODO: bug? return
this.next(key, value);
} else {
return false;
}
}
```
Hudi version : 0.6.1
Hive version : 2.4.3
Hadoop version : 2.7.3
Be glad to receive any help.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]