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 12:46:07 UTC

[GitHub] [arrow] alamb opened a new pull request #9275: ARROW-11323: [Rust][DataFusion] Allow sort queries to return no results

alamb opened a new pull request #9275:
URL: https://github.com/apache/arrow/pull/9275


   Prior to this PR, if a plan had an ORDER BY (Sort) that got no input rows, you would get an output error.
   
   Now the test passes and produces the (expected) no output rows
   


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



[GitHub] [arrow] alamb closed pull request #9275: ARROW-11323: [Rust][DataFusion] Allow sort queries to return no results

Posted by GitBox <gi...@apache.org>.
alamb closed pull request #9275:
URL: https://github.com/apache/arrow/pull/9275


   


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



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

Posted by GitBox <gi...@apache.org>.
alamb commented on pull request #9275:
URL: https://github.com/apache/arrow/pull/9275#issuecomment-764606664


   @jorgecarleitao  and @andygrove  -- if you have time, could you review this (small PR)? It is something I hit while trying to upgrade my downstream IOx project to use the latest arrow/datafusion
   
   


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



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

Posted by GitBox <gi...@apache.org>.
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



[GitHub] [arrow] github-actions[bot] commented on pull request #9275: ARROW-11323: [Rust][DataFusion] Allow sort queries to return no results

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #9275:
URL: https://github.com/apache/arrow/pull/9275#issuecomment-763583275


   https://issues.apache.org/jira/browse/ARROW-11323


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



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

Posted by GitBox <gi...@apache.org>.
alamb commented on pull request #9275:
URL: https://github.com/apache/arrow/pull/9275#issuecomment-764606664






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



[GitHub] [arrow] codecov-io commented on pull request #9275: ARROW-11323: [Rust][DataFusion] Allow sort queries to return no results

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #9275:
URL: https://github.com/apache/arrow/pull/9275#issuecomment-763592223


   # [Codecov](https://codecov.io/gh/apache/arrow/pull/9275?src=pr&el=h1) Report
   > Merging [#9275](https://codecov.io/gh/apache/arrow/pull/9275?src=pr&el=desc) (0297af3) into [master](https://codecov.io/gh/apache/arrow/commit/691286975f277f00586cabc6d834ff1efd8caf8c?el=desc) (6912869) will **increase** coverage by `0.00%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/arrow/pull/9275/graphs/tree.svg?width=650&height=150&src=pr&token=LpTCFbqVT1)](https://codecov.io/gh/apache/arrow/pull/9275?src=pr&el=tree)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master    #9275   +/-   ##
   =======================================
     Coverage   81.68%   81.68%           
   =======================================
     Files         215      215           
     Lines       52561    52577   +16     
   =======================================
   + Hits        42935    42949   +14     
   - Misses       9626     9628    +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/arrow/pull/9275?src=pr&el=tree) | Coverage Δ | |
   |---|---|---|
   | [rust/datafusion/src/execution/context.rs](https://codecov.io/gh/apache/arrow/pull/9275/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9leGVjdXRpb24vY29udGV4dC5ycw==) | `89.73% <100.00%> (+0.16%)` | :arrow_up: |
   | [rust/datafusion/src/physical\_plan/sort.rs](https://codecov.io/gh/apache/arrow/pull/9275/diff?src=pr&el=tree#diff-cnVzdC9kYXRhZnVzaW9uL3NyYy9waHlzaWNhbF9wbGFuL3NvcnQucnM=) | `89.26% <100.00%> (-0.39%)` | :arrow_down: |
   | [rust/parquet/src/encodings/encoding.rs](https://codecov.io/gh/apache/arrow/pull/9275/diff?src=pr&el=tree#diff-cnVzdC9wYXJxdWV0L3NyYy9lbmNvZGluZ3MvZW5jb2RpbmcucnM=) | `94.86% <0.00%> (-0.20%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/arrow/pull/9275?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/arrow/pull/9275?src=pr&el=footer). Last update [6912869...0297af3](https://codecov.io/gh/apache/arrow/pull/9275?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


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



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

Posted by GitBox <gi...@apache.org>.
alamb commented on pull request #9275:
URL: https://github.com/apache/arrow/pull/9275#issuecomment-764617434


   Thanks @jorgecarleitao !


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



[GitHub] [arrow] alamb closed pull request #9275: ARROW-11323: [Rust][DataFusion] Allow sort queries to return no results

Posted by GitBox <gi...@apache.org>.
alamb closed pull request #9275:
URL: https://github.com/apache/arrow/pull/9275


   


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