TheR1sing3un commented on PR #340:
URL: https://github.com/apache/paimon-rust/pull/340#issuecomment-4697367359

   Thanks @JingsongLi, good catch — confirmed.
   
   I've rebased this PR onto current `main`, which now includes #374 (the PR 
that adds `RecordBatchOptions::new().with_row_count(Some(batch.num_rows()))` to 
the reorder step in `kv_file_reader.rs`). So the empty-projection / `COUNT(*)` 
path no longer loses the row count when this lands — the fix flows in cleanly 
since this PR doesn't touch that reorder line.
   
   To lock it in, I also added an e2e regression test 
`test_pk_aggregation_count_star_empty_projection` in `pk_tables.rs`: it writes 
overlapping primary keys across two commits (5 raw rows, 3 distinct keys) and 
asserts `SELECT COUNT(*)` returns 3. Without the `with_row_count` fix the 
empty-projection reorder would report 0 rows and the count would collapse to 0.
   
   All green locally: `cargo fmt`, `cargo clippy -p paimon -p paimon-datafusion 
--features fulltext,vortex --tests -- -D warnings`, `cargo test -p paimon 
--features fulltext,vortex --lib` (828 passed), and `cargo test -p 
paimon-datafusion --test pk_tables` (49 passed).


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