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

Method run

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

run the test formats batches using parameters and returns the resulting output

(self)

Source from the content-addressed store, hash-verified

564 /// run the test
565 /// formats batches using parameters and returns the resulting output
566 fn run(self) -> String {
567 match self.with_header {
568 WithHeader::Yes => self.output_with_header(true),
569 WithHeader::No => self.output_with_header(false),
570 WithHeader::Ignored => {
571 let output = self.output_with_header(true);
572 // ensure the output is the same without header
573 let output_without_header = self.output_with_header(false);
574 assert_eq!(
575 output, output_without_header,
576 "Expected output to be the same with or without header"
577 );
578 output
579 }
580 }
581 }
582
583 fn output_with_header(&self, with_header: bool) -> String {
584 let mut buffer: Vec<u8> = vec![];

Callers 15

print_emptyFunction · 0.45
print_csv_no_headerFunction · 0.45
print_csv_with_headerFunction · 0.45
print_tsv_no_headerFunction · 0.45
print_tsv_with_headerFunction · 0.45
print_tableFunction · 0.45
print_jsonFunction · 0.45
print_ndjsonFunction · 0.45
print_maxrows_unlimitedFunction · 0.45

Calls 1

output_with_headerMethod · 0.80

Tested by 15

print_emptyFunction · 0.36
print_csv_no_headerFunction · 0.36
print_csv_with_headerFunction · 0.36
print_tsv_no_headerFunction · 0.36
print_tsv_with_headerFunction · 0.36
print_tableFunction · 0.36
print_jsonFunction · 0.36
print_ndjsonFunction · 0.36
print_maxrows_unlimitedFunction · 0.36