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

   I found one issue that is easy to miss when this PR is reviewed 
independently from #374.
   
   In `crates/paimon/src/table/kv_file_reader.rs`, the merged batch is 
reordered with `RecordBatch::try_new(output_schema.clone(), columns)`. When the 
projection is empty, e.g. `COUNT(*)`, `columns` is empty and Arrow cannot infer 
the row count from the arrays, so the reordered batch can lose the row count 
even though the merge stream produced rows. This affects aggregation/PK KV 
reads because this PR routes aggregation tables through the KV merge path.
   
   Please either include the 
`RecordBatchOptions::new().with_row_count(Some(batch.num_rows()))` fix here, or 
make this PR explicitly depend on the PR that adds it, so `COUNT(*)` / empty 
projection reads do not regress when this lands.
   


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