You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PostgreSQL and data.world (and others) have some very interesting boolean aggregation functions, BOOL_AND and BOOL_OR, which aggregate columns (here properties) based on a boolean expression (optionally into groups). While one can probably emulate these function with nested queries and counts, the appeal of these function would be their performant short-circuit implementation, meaning AND returns false as soon as the first false (in a group) is found, and OR returns true as soon as the first true (in a group) is found.
I would like to propose adding these two boolean aggregators, as they should be really useful for data cleaning or data exploration, answering questions like "Are all of ..." or "Are any of ..." fast. Thus, they also fit well with the Play With Data motto. Lastly, these functions are different to filtering with all() and any() due to different scope (property vs document) and are (only in purpose) similar to SQL's ALL and ANY.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
PostgreSQL and data.world (and others) have some very interesting boolean aggregation functions, BOOL_AND and BOOL_OR, which aggregate columns (here properties) based on a boolean expression (optionally into groups). While one can probably emulate these function with nested queries and
count
s, the appeal of these function would be their performant short-circuit implementation, meaningAND
returnsfalse
as soon as the firstfalse
(in a group) is found, andOR
returnstrue
as soon as the firsttrue
(in a group) is found.I would like to propose adding these two boolean aggregators, as they should be really useful for data cleaning or data exploration, answering questions like "Are all of ..." or "Are any of ..." fast. Thus, they also fit well with the Play With Data motto. Lastly, these functions are different to filtering with
all()
andany()
due to different scope (property vs document) and are (only in purpose) similar to SQL'sALL
andANY
.Thank you for considering my proposal
Beta Was this translation helpful? Give feedback.
All reactions