Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-72450

$or with regex to $in rewrite depends on terms order

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 6.0.3, 6.3.0-rc0
    • 7.0.0-rc0
    • None
    • None
    • Query Optimization
    • Fully Compatible
    • ALL
    • v6.3, v6.0, v5.0
    • QO 2023-01-23

    Description

      While working on SERVER-72416, I've noticed that the or_to_in.js is breaking when there is a collection level collation and no collation for the query. This is likely because the re-write logic is not handling re-writes properly and the assertions in the or_to_in.js are incorrect. I've also noticed that this and this assertions are not doing anything, as they both generate the undefined value. The path for parsedQuery is plan.queryPlanner.parsedQuery. We should also fix this assertion after figuring out the expected correct behavior. ian.boros@mongodb.com pointed out that regex should not be collation aware. So we should probably disable all string and regex combination re-writes.

      Attachments

        Issue Links

          Activity

            People

              timour.katchaounov@mongodb.com Timour Katchaounov
              arun.banala@mongodb.com Arun Banala
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: