Skip to content

Commit e19010b

Browse files
committed
Revert "Fix: New Datafusion-cli streaming printing way should handle corner case for only one small batch which lines are less than max_rows (apache#14921)"
This reverts commit 463ef3b.
1 parent 5e49094 commit e19010b

File tree

2 files changed

+1
-13
lines changed

2 files changed

+1
-13
lines changed

datafusion-cli/src/print_options.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ impl PrintOptions {
151151
print_options
152152
.format
153153
.print_header(&schema, &widths, writer)?;
154+
header_printed = true;
154155
}
155156
for preview_batch in preview_batches.drain(..) {
156157
print_options.format.print_batch_with_widths(
@@ -197,13 +198,6 @@ impl PrintOptions {
197198
writer,
198199
)?;
199200
}
200-
for preview_batch in preview_batches.drain(..) {
201-
print_options.format.print_batch_with_widths(
202-
&preview_batch,
203-
precomputed_widths.as_ref().unwrap(),
204-
writer,
205-
)?;
206-
}
207201
}
208202
if let Some(ref widths) = precomputed_widths {
209203
print_options.format.print_bottom_border(widths, writer)?;

datafusion-cli/tests/cli_integration.rs

-6
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@ fn init() {
5151
["--command", "show datafusion.execution.batch_size", "--format", "json", "-q", "-b", "1"],
5252
"[{\"name\":\"datafusion.execution.batch_size\",\"value\":\"1\"}]\n"
5353
)]
54-
55-
/// Add case fixed issue: https://github.com/apache/datafusion/issues/14920
56-
#[case::exec_from_commands(
57-
["--command", "SELECT * FROM generate_series(1, 5) t1(v1) ORDER BY v1 DESC;", "--format", "table", "-q"],
58-
"+----+\n| v1 |\n+----+\n| 5 |\n| 4 |\n| 3 |\n| 2 |\n| 1 |\n+----+\n"
59-
)]
6054
#[test]
6155
fn cli_quick_test<'a>(
6256
#[case] args: impl IntoIterator<Item = &'a str>,

0 commit comments

Comments
 (0)