Skip to content

Commit eef0a36

Browse files
committed
debug: Add logging to collect_record_batches_to_display for better traceability
1 parent 0c4eaa6 commit eef0a36

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/dataframe.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,8 +904,10 @@ async fn collect_record_batches_to_display(
904904
let mut rows_so_far = 0;
905905
let mut record_batches = Vec::default();
906906
let mut has_more = false;
907+
println!("==> min_rows: {min_rows}, max_rows: {max_rows}, max_bytes: {max_bytes}");
907908

908-
while (size_estimate_so_far < max_bytes && rows_so_far < max_rows) || rows_so_far < min_rows {
909+
while size_estimate_so_far < max_bytes && rows_so_far < max_rows && rows_so_far < min_rows {
910+
println!("==> size_estimate_so_far: {size_estimate_so_far}, rows_so_far: {rows_so_far}");
909911
let mut rb = match stream.next().await {
910912
None => {
911913
break;
@@ -944,6 +946,9 @@ async fn collect_record_batches_to_display(
944946
record_batches.push(rb);
945947
}
946948
}
949+
println!(
950+
"==> after while, size_estimate_so_far: {size_estimate_so_far}, rows_so_far: {rows_so_far}"
951+
);
947952

948953
if record_batches.is_empty() {
949954
return Ok((Vec::default(), false));

0 commit comments

Comments
 (0)