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

Type checker removes $switch that has no "default" branch

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0, 8.0.0-rc6
    • Affects Version/s: 8.0.0-rc0, 8.1.0-rc0
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • ALL
    • v8.0
    • 0

      Such a $switch creates an if() statement where one of the branches is a fail() expression, and such statement cannot be folded away as it has an unpredicatable runtime behavior.

      Every type checking operation that involves a fail() operation should avoid assuming that the fail() can be optimized away, thing that can happen since SERVER-86208 made it return a special, no-bit-set type information

            Assignee:
            alberto.massari@mongodb.com Alberto Massari
            Reporter:
            alberto.massari@mongodb.com Alberto Massari
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: