MCPcopy Create free account
hub / github.com/apache/datafusion / split_batch

Function split_batch

datafusion-cli/src/print_format.rs:671–678  ·  view source on GitHub ↗

Slice the record batch into 2 batches

(batch: &RecordBatch)

Source from the content-addressed store, hash-verified

669
670 /// Slice the record batch into 2 batches
671 fn split_batch(batch: &RecordBatch) -> Vec<RecordBatch> {
672 assert!(batch.num_rows() > 1);
673 let split = batch.num_rows() / 2;
674 vec![
675 batch.slice(0, split),
676 batch.slice(split, batch.num_rows() - split),
677 ]
678 }
679}

Callers 9

print_csv_no_headerFunction · 0.70
print_csv_with_headerFunction · 0.70
print_tsv_no_headerFunction · 0.70
print_tsv_with_headerFunction · 0.70
print_tableFunction · 0.70
print_jsonFunction · 0.70
print_ndjsonFunction · 0.70

Calls

no outgoing calls

Tested by 9

print_csv_no_headerFunction · 0.56
print_csv_with_headerFunction · 0.56
print_tsv_no_headerFunction · 0.56
print_tsv_with_headerFunction · 0.56
print_tableFunction · 0.56
print_jsonFunction · 0.56
print_ndjsonFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…