You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/01/20 13:59:08 UTC

[GitHub] [arrow] alamb commented on a change in pull request #9275: ARROW-11323: [Rust][DataFusion] Allow sort queries to return no results

alamb commented on a change in pull request #9275:
URL: https://github.com/apache/arrow/pull/9275#discussion_r560979269



##########
File path: rust/datafusion/src/physical_plan/sort.rs
##########
@@ -141,7 +141,10 @@ fn sort_batches(
     batches: &Vec<RecordBatch>,
     schema: &SchemaRef,
     expr: &[PhysicalSortExpr],
-) -> ArrowResult<RecordBatch> {
+) -> ArrowResult<Option<RecordBatch>> {

Review comment:
       Note that I did not use `create_empty_record_batch` to create a 0 row record batch (the approach taken in hash_aggregrate.rs)  https://github.com/apache/arrow/blob/master/rust/datafusion/src/physical_plan/hash_aggregate.rs#L827, as the approach in this PR will support any data type now or in the future.




----------------------------------------------------------------
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.

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