Reorder switch case in db/pipeline/value.cpp

XMLWordPrintableJSON

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

      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 - Query Team (Inactive)
              Reporter:
              Simon
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: