hudi-bot opened a new issue, #14719:
URL: https://github.com/apache/hudi/issues/14719

   The rt view query returns a wrong result with predicate push down.
   
   This is my query on a Near-Realtime (RT) 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 .
   {code: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;
    }
   }
   {code}
   
   ## JIRA info
   
   - Link: https://issues.apache.org/jira/browse/HUDI-1462
   - Type: Bug
   - Affects version(s):
     - 0.8.0
   
   
   ---
   
   
   ## Comments
   
   28/Dec/20 09:15;danny0405;What is a rt view ?;;;
   
   ---
   
   07/Jan/21 04:19;qian heng;[~danny0405] It means Near-Realtime (RT) table. 
I've corrected it.;;;


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

Reply via email to