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

Reorder switch case in db/pipeline/value.cpp

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Trivial - P5 Trivial - P5
    • None
    • Affects Version/s: 3.4.10, 3.6.0-rc2
    • Component/s: Internal Code
    • Labels:
      None
    • Query

      The method Value::compare in src/mongo/db/pipeline/value.cpp states :

          switch (lType) {
              // Order of types is the same as in BSONElement::compareElements() to make it easier to
              // verify.
      

      Although it presents the case NumberDecimal before case NumberInt whereas it should be located after case NumberDouble to match src/mongo/bson/bsonelement.cpp.

      This does not have any impact but just matches the explicit comment. Or else, just remove the comment if this is not of importance.

            Assignee:
            backlog-server-query Backlog - Query Team (Inactive)
            Reporter:
            Uyttendaele Simon
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: