Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle nullptr return value from bitmask_or in distinct_count (#13590)
If nulls should compare equal then we want to filter out rows for which all column entries are invalid (bitmask not set). If any column is not nullable, then bitmask_or returns an empty bitmask buffer (and a null count of zero) indicating that the returned bitmask is fully valid. When passed as a predicate to insert_if we get a null pointer dereference. To avoid this, only run predicated insertion if the null count returned from bitmask_or is positive (which guarantees that the validity bitmask exists). This also avoids running predicated insertion when the predicate is always true. Closes #13576. Authors: - Lawrence Mitchell (https://github.com/wence-) Approvers: - Nghia Truong (https://github.com/ttnghia) - Yunsong Wang (https://github.com/PointKernel) URL: #13590
- Loading branch information