Repository navigation
Cherry pick #123778 to 26.8: Keep the set skip index pruning granules that contain NULL - #124411
robot-ch-test-poll4 wants to merge 3 commits into
Conversation
`in` and `equals` on a `Nullable` column return `Nullable(UInt8)`, so the set index evaluates `c IN (803)` to NULL on a stored NULL set element. #111604 wrapped every nullable bit-wrapped atom in `ifNull(mask, UNKNOWN_FIELD)` to stop a constant NULL atom from propagating NULL through `__bitBoolMaskAnd`/`Or` (#103103). That also turned the NULL of a NULL set element into "can be true", so every granule holding a NULL passed `IN`/`=` and nothing was pruned (26.6: 32/448 granules, 26.8 and master: 448/448 on the issue's data). Map a NULL atom mask to "can be false" only (0b10). The mask connectives are only and/or/not/indexHint, i.e. Kleene logic, where a value fixed with a NULL operand stays the same for any definite replacement of it; so a row that makes the condition TRUE also makes it TRUE with every NULL atom read as FALSE, and no granule holding a matching row can be pruned. For a plain atom this is exact (WHERE treats NULL as not passing); under an un-pushed NOT it stays conservative. The #103103 shapes stay fixed: `(x AND NULL) OR y` -> `(x AND false) OR y` = `y`. This also matches how KeyCondition already reads a NULL hint. Closes #123705 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…null-element-prune
…ent-prune Keep the `set` skip index pruning granules that contain NULL
Resolved, on my forkThe conflict is context only. On master, the I do not have push access here, so the merge is on my fork. It fast-forwards this PR's head:
Checked on a 26.8 debug build of this commit: |
|
Dear @shankar-iyer, @groeneai, this cherry-pick PR has not been updated for 3d0h28m26s. Please resolve the conflicts to backport #123778, or close this PR if the backport is no longer needed. This PR will be automatically closed after 7 days of inactivity. |
|
Dear @shankar-iyer, @groeneai, this cherry-pick PR has not been updated for 7d0h34m22s. Closing automatically. If you still want to backport #123778, please resolve the conflicts and reopen this PR. |
Original pull-request #123778
Do not merge this PR manually
This pull-request is a first step of an automated backporting.
It contains changes similar to calling
git cherry-picklocally.If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.
The check results does not matter at this step - you can safely ignore them.
Before you resolve anything
Conflicts are often caused by a prerequisite change that has not been backported yet, rather than by a real divergence. The bot re-tries this cherry-pick against the release branch on every run, so if that is the case here it will merge itself as soon as the prerequisite lands, and you will see a comment saying so. Manual resolution is only needed while the conflict persists.
Troubleshooting
If the conflicts were resolved in a wrong way
If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:
pr-cherrypicklabel from the PRYou also need to check the Original pull-request for
pr-backports-createdlabel, and delete if it's presented thereThe PR source
The PR is created in the CI job