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
[C++][Documentation] Explicit documentation of null slot interpretation #22759
To my knowledge, there isn't explicit documentation on how null slots in an array should be interpreted. SQL uses Kleene logic, wherein a null is explicitly an unknown rather than a special value. This yields for example (null AND false) -> false, since (x AND false) -> false for all possible values of x. This is also the behavior of Gandiva's boolean expressions.
By contrast the boolean kernels implement something closer to the behavior of NaN: (null AND false) -> null. I think this is simply an error in the boolean kernels but in any case I think explicit documentation should be added to prevent future confusion.
Ben Kietzman / @bkietz:
If the current boolean kernel behavior is necessary for some use cases an option struct could be added to make this configurable
Wes McKinney / @wesm:
Do you want to document this as a comment in the C++ kernels code? I don't think any changes need to be made to the columnar format documentation
Ben Kietzman / @bkietz:
Interpretation of nulls will be left open for individual kernels. #5771 adds explicit Kleene logic overloads of the boolean kernels, allowing SQL compatible behavior in dataset filter expressions.
Activity
asfimport commentedon Aug 29, 2019
Ben Kietzman / @bkietz:
If the current boolean kernel behavior is necessary for some use cases an option struct could be added to make this configurable
asfimport commentedon Sep 10, 2019
Wes McKinney / @wesm:
Do you want to document this as a comment in the C++ kernels code? I don't think any changes need to be made to the columnar format documentation
asfimport commentedon Jan 14, 2020
Ben Kietzman / @bkietz:
Interpretation of nulls will be left open for individual kernels. #5771 adds explicit Kleene logic overloads of the boolean kernels, allowing SQL compatible behavior in dataset filter expressions.