FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

docs(clickhouse): the value-position `NOT (NOT` bug has a fix in flight by alexey-milovidov · Pull Request #14 · ClickHouse/sqlancer · GitHub

docs(clickhouse): the value-position NOT (NOT bug has a fix in flight - #14

Open
alexey-milovidov wants to merge 1 commit into
mainfrom
note-not-value-position-fix
Open

docs(clickhouse): the value-position NOT (NOT bug has a fix in flight#14
alexey-milovidov wants to merge 1 commit into
mainfrom
note-not-value-position-fix

Conversation

Copy link
Copy Markdown
Member

The NOT (NOT key) entry in the known-open-bugs list was right down to the line — the
name == "not" branch of cloneDAGWithInversionPushDown pushes an inversion through every not
regardless of boolean_context, so a pair of them cancels and NOT NOT c1 reaches index analysis
as bare c1.

ClickHouse#116381 gates that branch on
boolean_context: not stays an ordinary function in a value position, where the atom is then
opaque to index analysis (sound), while a truth-tested NOT is still pushed down as before. It
carries a regression test covering the statistics, view, primary-key, partition and minmax
skip-index pruning paths, and I diffed all 233 index/pruning-related stateless tests with and
without the change — the new test is the only one whose result moves.

So this updates the entry rather than deleting it (the fix is not merged yet), and records what to
expect until it is: the bug accounted for 20 of the 87 findings in the 2026-08-25 ClickHouse
nightly, spread over KeyCondition, ViewEquivalence, SubqueryMaterialize, PartitionMirror,
CountOptimization, TLPGroupBy, TLPDistinct, TLPAggregate here plus SQLancer++'s NoREC and
QUERY_PARTITIONING. Any of those with NOT (NOT in the failing query is this one bug, not ten —
which is the thing that cost the most time to work out during triage.

Per this file's own convention the entry gets deleted once the fix merges and head stops
reproducing.

This entry's diagnosis was right down to the line: the `name == "not"` branch of
`cloneDAGWithInversionPushDown` pushes an inversion through every `not` regardless
of `boolean_context`, so a pair of them cancels and `NOT NOT c1` reaches index
analysis as bare `c1`. ClickHouse#116381 gates that branch on `boolean_context`,
so `not` stays an ordinary function in a value position - the atom is then opaque
to index analysis, which is sound - while a truth-tested `NOT` is still pushed
down as before.

Record the PR so the next triage does not re-derive it, and note what to expect
while it is unmerged: it accounted for 20 of the 87 findings in the 2026-08-25
ClickHouse nightly, spread over eight oracles here plus SQLancer++'s NoREC and
QUERY_PARTITIONING, so any of those with `NOT (NOT` in the failing query is this
one bug rather than ten. Per this file's own convention the entry gets deleted
once the fix merges and head stops reproducing.

Copy link
Copy Markdown
Member Author

@qoega could you review this one? A formal review request is not possible here - GitHub only allows them from collaborators on this repository, and you are not one on ClickHouse/sqlancer yet.

qoega left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

why do we have claude md in this repo? and not in CI check folder?

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL