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
{{ message }}
Repository navigation
[FEA] Null-tolerant logical AND and OR operations #8980
Is your feature request related to a problem? Please describe.
Currently the logical AND and OR binary operators are what I would call "null intolerant", in that any null input automatically results in a null output regardless of the operand and other inputs. However for SQL engines, logical AND and OR treat null as an "unknown value", and in that context a non-null result can occur in spite of a null input. For example:
Currently the RAPIDS Accelerator has to hack around the null intolerant form of LOGICAL_AND and LOGICAL_OR to "fixup" the value if one side was false or true, respectively. When it comes to the AST versions of these operations, there isn't yet enough expressiveness to hack up the correct answer since it is missing something like an if statement.
Describe the solution you'd like
libcudf could have null-tolerant, short-circuiting, or whatever name we want to call it form of logical AND and OR that can return non-null inputs in some cases despite one of the inputs being null. These new operators would be available both in the binops API and also as AST binary operators for AST expressions.
Describe alternatives you've considered
Without these operators we would need to perform extra steps to detect and "fixup" the incorrect null answer in the short-circuit cases. The AST currently lacks the ability to express this behavior, so we either need direct support of the binary operation or the ability to express the fixup logic in order to support logical AND and OR Spark expressions in conditional joins.
This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.
Activity
vyasr commentedon Aug 25, 2021
#9096 addresses this request for AST expressions.
Make AST operators nullable (#9096)
github-actions commentedon Nov 15, 2021
This issue has been labeled
inactive-30ddue to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeledinactive-90dif there is no activity in the next 60 days.jlowe commentedon Nov 15, 2021
Still would like to see this for regular logical binary ops outside of AST. Low priority.