[SERVER-71528] [CQF] Pushdown Not through ComposeA, Default, Constant Created: 21/Nov/22  Updated: 29/Oct/23  Resolved: 19/May/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.1.0-rc0

Type: Improvement Priority: Major - P3
Reporter: David Percy Assignee: Chi-I Huang
Resolution: Fixed Votes: 0
Labels: Ideas, bonsai-onboarding, optimization
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-77020 [CQF] Pushdown Not through ComposeA Closed
depends on SERVER-77021 [CQF] Pushdown Not through Default Closed
depends on SERVER-77022 [CQF] Pushdown Not through PathConstant Closed
Assigned Teams:
Query Optimization
Backwards Compatibility: Fully Compatible
Sprint: QO 2023-05-15, QO 2023-05-29
Participants:

 Description   

We can extend the NotPushdown rewrite to handle more cases, which can result in better bounds, or at least simpler expressions to evaluate.

For example (pseudocode):

  • Not (ComposeA p1 p2) -> ComposeM (Not p1) (Not p2)
    • Should help $nor queries, or more complex boolean expressions.
  • Not (Default e) -> Default (Not e)
    • In an EvalFilter context, Default returns either its argument or the negation of its argument.
    • This will help us combine $not with $exists.
  • Not (Constant e) -> Constant (Not e)
    • Should help with constant folding.


 Comments   
Comment by Chi-I Huang [ 11/May/23 ]

I figured that Default and Constant here are actually PathDefault and PathConstant as we have already had constant folding to address the simplification of Constant.

Generated at Thu Feb 08 06:19:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.