- Notifications
You must be signed in to change notification settings - Fork5
Commit220e45b
committed
Improve the planner's simplification of NOT constructs.
This patch merges the responsibility for NOT-flattening intoeval_const_expressions' processing. It wasn't done that way originallybecause prepqual.c is far older than eval_const_expressions. But puttingthis work into eval_const_expressions saves one pass over the qual trees,and in fact saves even more than that because we can exploit the knowledgethat the subexpressions have already been recursively simplified. Doing itthis way also lets us do it uniformly over all expressions, whereasprepqual.c formerly just did it at top level to save cycles. That shouldimprove the planner's ability to recognize logically-equivalent constructs.While at it, also add the ability to fold a NOT into BooleanTest andNullTest constructs (the latter only for the scalar-datatype case).Per discussion of bug #5702.1 parentb48b9cb commit220e45b
File tree
3 files changed
+237
-181
lines changed- src
- backend/optimizer
- prep
- util
- include/optimizer
3 files changed
+237
-181
lines changed0 commit comments
Comments
(0)