Skip to content

Conversation

@neilconway
Copy link
Contributor

@neilconway neilconway commented Feb 7, 2026

A WHERE clause like 4==(3/0) will not be optimized away, but will result in context.selectivity being None.

Which issue does this PR close?

Are these changes tested?

Added test case.

@github-actions github-actions bot added the physical-expr Changes to the physical-expr crates label Feb 7, 2026
@neilconway neilconway force-pushed the neilc/divide-zero-selectivity branch from b0c5cb3 to 10073aa Compare February 7, 2026 21:22
@github-actions github-actions bot added the sqllogictest SQL Logic Tests (.slt) label Feb 7, 2026
A WHERE clause like `4==(3/0)` will not be optimized away, but will
result in `context.selectivity` being `None`.
@neilconway neilconway force-pushed the neilc/divide-zero-selectivity branch from 10073aa to 7eabc7c Compare February 8, 2026 02:57
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @neilconway (this is quite a streak you have coming)

@alamb alamb added this pull request to the merge queue Feb 8, 2026
Merged via the queue into apache:main with commit badaa84 Feb 8, 2026
32 checks passed
@neilconway neilconway deleted the neilc/divide-zero-selectivity branch February 8, 2026 14:14
@neilconway
Copy link
Contributor Author

Thank you @neilconway (this is quite a streak you have coming)

Thanks for the reviews! (I decided to resuscitate the fuzzer, which is how I found these issues.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-expr Changes to the physical-expr crates sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assert failure on trivial WHERE with divide-by-zero

2 participants