You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "vincev (via GitHub)" <gi...@apache.org> on 2023/08/16 12:21:51 UTC

[GitHub] [arrow-datafusion] vincev opened a new pull request, #7300: Fix Unnest for array aggregations.

vincev opened a new pull request, #7300:
URL: https://github.com/apache/arrow-datafusion/pull/7300

   ## Which issue does this PR close?
   
   Closes #7299.
   
   ## Rationale for this change
   
   When unnesting a list array created by `array_agg` aggregation fails with error:
   
   ```
   ArrowError(ComputeError("concat requires input of at least one array"))
   ```
   
   This PR adds code to prevent `concat` from being called with an empty array during unnesting.
   
   ## What changes are included in this PR?
   
   This PR adds code to prevent `concat` from being called with an empty array during unnesting.
   
   This PR also removes the `list_lengths` workaround fixed in  [arrow #4517](https://github.com/apache/arrow-rs/issues/4517).
   
   ## Are these changes tested?
   
   Yes added a test for the failing scenario.
   
   
   ## Are there any user-facing changes?
   
   No


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


[GitHub] [arrow-datafusion] vincev commented on pull request #7300: Fix Unnest for array aggregations.

Posted by "vincev (via GitHub)" <gi...@apache.org>.
vincev commented on PR #7300:
URL: https://github.com/apache/arrow-datafusion/pull/7300#issuecomment-1681053392

   thank you @alamb, @izveigor for your review.


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


[GitHub] [arrow-datafusion] alamb merged pull request #7300: Fix Unnest for array aggregations.

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #7300:
URL: https://github.com/apache/arrow-datafusion/pull/7300


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


[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #7300: Fix Unnest for array aggregations.

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #7300:
URL: https://github.com/apache/arrow-datafusion/pull/7300#discussion_r1296237845


##########
datafusion/core/tests/dataframe/mod.rs:
##########
@@ -1298,6 +1298,96 @@ async fn unnest_aggregate_columns() -> Result<()> {
     Ok(())
 }
 
+#[tokio::test]
+async fn unnest_array_agg() -> Result<()> {

Review Comment:
   I verified that this test covers the code in this PR by running it without the code changes locally. It fails as expected 💯 
   
   ```
   
   ---- dataframe::unnest_array_agg stdout ----
   Error: ArrowError(ComputeError("concat requires input of at least one array"))
   
   ```



##########
datafusion/core/tests/dataframe/mod.rs:
##########
@@ -1298,6 +1298,96 @@ async fn unnest_aggregate_columns() -> Result<()> {
     Ok(())
 }
 
+#[tokio::test]
+async fn unnest_array_agg() -> Result<()> {

Review Comment:
   I verified that this test covers the code in this PR by running it without the code changes locally. It fails as expected 💯 
   
   ```
   
   ---- dataframe::unnest_array_agg stdout ----
   Error: ArrowError(ComputeError("concat requires input of at least one array"))
   
   ```



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