-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for BOOLOR_AGG, BOOLXOR_AGG, BOOLAND_AGG aggregate function #22949
Comments
Thanks for the proposal! Because this is an aggregate function, so I suggest it is better named https://docs.snowflake.com/en/sql-reference/functions/boolor_agg also it will be great if starrocks can support boolxor_agg, booland_agg. |
If they can use the same function names as in vertica it makes portability slightly easier since the same SQL will execute in both vertica and starrocks. No big deal either way since we have a dialect abstraction in our code. |
@kateshaowanjou If no one has claimed this task yet, I'll try it |
@zhangruchubaba hi buddy hows everything going? :) |
yeah! work in progress |
We have marked this issue as stale because it has been inactive for 6 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to StarRocks! |
@wangsimo0 If no one has claimed this task yet, I'll try it. This is not closed. I've changed the assignee to you. If you have any questions we can discuss them via IM if you prefer: |
Feature request
Is your feature request related to a problem? Please describe.
We currently have cases where we need to perform a logical OR aggregation over a boolean column. We currently do this like this
If there were a BOOL_OR, it would be potentially more optimal since it would allow the aggregation to short-circuit, stopping aggregation as soon as it observes a single TRUE
Describe the solution you'd like
A BOOL_OR aggregation that matches Vertica's BOOL_OR aggregation
https://www.vertica.com/docs/9.3.x/HTML/Content/Authoring/SQLReferenceManual/Functions/Aggregate/BOOLORAggregate.htm?tocpath=SQL%20Reference%20Manual%7CSQL%20Functions%7CAggregate%20Functions%7C_____12
Describe alternatives you've considered
The SELECT COUNT CASE WHEN > 1 that I mention above. It works but possibly sub-optimal.
Additional context
The text was updated successfully, but these errors were encountered: