Skip to content

Conversation

@ptkool
Copy link
Contributor

@ptkool ptkool commented Apr 16, 2017

What changes were proposed in this pull request?

This pull request implements the EVERY and ANY aggregates.

How was this patch tested?

Testing was performed using unit tests, integration tests, and manual tests.

@ptkool ptkool changed the title Every any aggregates [SPARK-19851] Add support for EVERY and ANY (SOME) aggregates Apr 16, 2017
@ptkool
Copy link
Contributor Author

ptkool commented Apr 16, 2017

Moved this PR to a feature branch and lost comments. The original PR is here: #17194

@rxin
Copy link
Contributor

rxin commented Apr 18, 2017

Can we just do a logical rewrite to turn them into "condA + condB + condC > 0" (for Some/Any) and "condA + condB + condC = 3" for Every?

@ptkool
Copy link
Contributor Author

ptkool commented Apr 21, 2017

@rxin I'm not sure where you're going with your proposal. These are aggregate functions, not scalar functions.

@rxin
Copy link
Contributor

rxin commented Apr 21, 2017

I was saying rather than implementing them, just rewrite them into an aggregate on the conditions and compare them against the value.

@ptkool
Copy link
Contributor Author

ptkool commented Apr 24, 2017

@rxin Ok. So you're proposing rewrites for these aggregates that look something like this?

some(cond)  => sum(cond) > 0
every(cond) => sum(not(cond)) = 0

@ptkool
Copy link
Contributor Author

ptkool commented Apr 24, 2017

@rxin Actually, @hvanhovell proposed the following rewrites which I think are better:

some(cond)  => max(cond) = true
every(cond) => min(cond) = true

@rxin
Copy link
Contributor

rxin commented Apr 24, 2017

sgtm

@gatorsmile
Copy link
Member

@ptkool Could you address the comments and we can review it? Thanks!

@ptkool ptkool force-pushed the every_any_aggregates branch from 97bec05 to e0b5cc6 Compare October 29, 2017 13:58
@HyukjinKwon
Copy link
Member

ok to test

@HyukjinKwon
Copy link
Member

@ptkool mind updating the PR please?

@SparkQA
Copy link

SparkQA commented Jul 16, 2018

Test build #93044 has finished for PR 17648 at commit e0b5cc6.

  • This patch fails to generate documentation.
  • This patch does not merge cleanly.
  • This patch adds no public classes.

@gatorsmile
Copy link
Member

@dilipbiswal Could you take this over?

@dilipbiswal
Copy link
Contributor

@gatorsmile Sure.

@gatorsmile
Copy link
Member

@ptkool Thanks for your contribution! This feature will be available in the next release. Spark 3.0

@ptkool ptkool deleted the every_any_aggregates branch January 18, 2020 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants