Why not return `false`/`true` when one of the children's expressions returns `false`/`true` in `AND`/`OR` directly in with the conjunction simplification rule
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 4.4k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
Question
I wonder when one of the children in the AND conjunction expression returns false, this code snippet does not return false directly. Instead, it returns the first child expression (L57-L60). A similar case for the OR conjunction expression (L66-L69).
Thank you.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/observer/sql/optimizer/conjunction_simplification_rule.cpp at lines 52-74 and trace the AND/OR simplification entry point and its expression semantics. Determine whether replacing the returned child expression with a boolean literal is valid in both cases; done means the behavior is justified or the requested change is clearly specified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100