You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/03/23 20:22:26 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #5709: Executing LocalLimitExec with no column should not return an Err

alamb commented on code in PR #5709:
URL: https://github.com/apache/arrow-datafusion/pull/5709#discussion_r1146782560


##########
datafusion/core/src/physical_plan/limit.rs:
##########
@@ -462,7 +462,8 @@ impl LimitStream {
                 .iter()
                 .map(|col| col.slice(0, col.len().min(batch_rows)))
                 .collect();
-            Some(RecordBatch::try_new(batch.schema(), limited_columns).unwrap())
+            let options = RecordBatchOptions::new().with_row_count(Option::from(batch_rows));

Review Comment:
   I agree it is nice



-- 
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@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org