You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/12/29 21:06:03 UTC

[GitHub] [spark] ueshin opened a new pull request, #39297: [SPARK-41778][SQL] Add an alias "reduce" to ArrayAggregate

ueshin opened a new pull request, #39297:
URL: https://github.com/apache/spark/pull/39297

   ### What changes were proposed in this pull request?
   
   Adds an alias "reduce" to `ArrayAggregate`.
   
   Also modified the higher-order functions to also copy tags when binding to propagate them properly.
   
   ### Why are the changes needed?
   
   Presto provides the function: https://prestodb.io/docs/current/functions/array.html#reduce.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes, a new alias for `ArrayAggregate`.
   
   For example:
   
   ```sql
   SELECT reduce(array(1, 2, 3), 0, (acc, x) -> acc + x);
   SELECT reduce(array(1, 2, 3), 0, (acc, x) -> acc + x, acc -> acc * 10);
   ```
   
   as the same as "aggregate":
   
   ```sql
   SELECT aggregate(array(1, 2, 3), 0, (acc, x) -> acc + x);
   SELECT aggregate(array(1, 2, 3), 0, (acc, x) -> acc + x, acc -> acc * 10);
   ```
   
   ### How was this patch tested?
   
   Added/modified tests.


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun commented on pull request #39297: [SPARK-41778][SQL] Add an alias "reduce" to ArrayAggregate

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on PR #39297:
URL: https://github.com/apache/spark/pull/39297#issuecomment-1367685930

   Merged to master for Apache Spark 3.4.0.


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun closed pull request #39297: [SPARK-41778][SQL] Add an alias "reduce" to ArrayAggregate

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun closed pull request #39297: [SPARK-41778][SQL] Add an alias "reduce" to ArrayAggregate
URL: https://github.com/apache/spark/pull/39297


-- 
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: reviews-unsubscribe@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org