Skip to content

[C++][Documentation] Explicit documentation of null slot interpretation #22759

Closed

Description

@asfimport

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.

Reporter: Ben Kietzman / @bkietz
Assignee: Ben Kietzman / @bkietz

Related issues:

PRs and other links:

Note: This issue was originally created as ARROW-6386. Please see the migration documentation for further details.

Activity

  1. asfimport commented on Aug 29, 2019

    @asfimport
    Author

    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

  2. asfimport commented on Sep 10, 2019

    @asfimport
    Author

    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

  3. asfimport commented on Jan 14, 2020

    @asfimport
    Author

    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.

  4. added this to the 0.16.0 milestone on Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions