Copilot commented on code in PR #559:
URL: https://github.com/apache/fluss-rust/pull/559#discussion_r3294015284
##########
crates/fluss/tests/integration/log_table.rs:
##########
@@ -452,6 +452,188 @@ mod table_test {
records
}
+ fn extract_ids_from_batches(batches: &[ScanBatch]) -> Vec<i32> {
+ batches
+ .iter()
+ .flat_map(|b| {
+ let batch = b.batch();
+ (0..batch.num_rows()).map(move |i| {
+ batch
+ .column(0)
+ .as_any()
+ .downcast_ref::<Int32Array>()
+ .expect("id column should be Int32")
+ .value(i)
+ })
+ })
+ .collect()
+ }
Review Comment:
`extract_ids_from_batches` duplicates the batch->ids extraction helper that
already exists later in this file inside `test_poll_batches` (`fn
extract_ids(...)`). Consider reusing a single shared helper (and removing the
inner `use arrow::array::Int32Array;` + nested function) to avoid drift if the
extraction logic ever needs to change.
--
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]