You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "milenkovicm (via GitHub)" <gi...@apache.org> on 2026/02/28 12:04:12 UTC
Re: [PR] fix: Don't use `maxrows` as a "fetched rows" but calculate it from the batches [datafusion-ballista]
milenkovicm commented on code in PR #1480:
URL: https://github.com/apache/datafusion-ballista/pull/1480#discussion_r2867412666
##########
ballista-cli/src/exec.rs:
##########
@@ -179,13 +175,13 @@ async fn exec_and_print(
ctx: &SessionContext,
print_options: &PrintOptions,
sql: String,
- row_count: usize,
) -> Result<()> {
let now = Instant::now();
let df = ctx.sql(&sql).await?;
let schema = Arc::new(df.schema().as_arrow().clone());
let results = df.collect().await?;
Review Comment:
should we keep max_rows, add limit here, if limited ?
##########
ballista-cli/src/exec.rs:
##########
@@ -179,13 +175,13 @@ async fn exec_and_print(
ctx: &SessionContext,
print_options: &PrintOptions,
sql: String,
- row_count: usize,
) -> Result<()> {
let now = Instant::now();
let df = ctx.sql(&sql).await?;
let schema = Arc::new(df.schema().as_arrow().clone());
let results = df.collect().await?;
- print_options.print_batches(schema, &results, now, row_count, &Default::default())?;
+ let rows = &results.iter().map(|b| b.num_rows()).sum::<usize>();
Review Comment:
this makes sense, we calculate total number here
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org