Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-2467

Regression test for "number" alias in $$type operator

    • Needed
    • Hide

      Summary of necessary driver changes

      • Adds test coverage for $$type operator with "number"

      Commits for syncing spec/prose tests

      Show
      Summary of necessary driver changes Adds test coverage for $$type operator with "number" Commits for syncing spec/prose tests Sync unified test format "valid-pass" tests with mongodb/specifications@39094b0
    • $i18n.getText("admin.common.words.hide")
      Key Status/Resolution FixVersion
      CDRIVER-5787 Backlog
      CXX-3159 Backlog
      CSHARP-5391 Backlog
      GODRIVER-3409 Backlog
      JAVA-5682 Backlog
      NODE-6490 Needs Triage
      MOTOR-1401 Duplicate
      PYTHON-4937 Backlog
      PHPLIB-1579 Fixed 1.21.0
      RUBY-3581 Backlog
      RUST-2084 Backlog
      $i18n.getText("admin.common.words.show")
      #scriptField, #scriptField *{ border: 1px solid black; } #scriptField{ border-collapse: collapse; } #scriptField td { text-align: center; /* Center-align text in table cells */ } #scriptField td.key { text-align: left; /* Left-align text in the Key column */ } #scriptField a { text-decoration: none; /* Remove underlines from links */ border: none; /* Remove border from links */ } /* Add green background color to cells with FixVersion */ #scriptField td.hasFixVersion { background-color: #00FF00; /* Green color code */ } /* Center-align the first row headers */ #scriptField th { text-align: center; } Key Status/Resolution FixVersion CDRIVER-5787 Backlog CXX-3159 Backlog CSHARP-5391 Backlog GODRIVER-3409 Backlog JAVA-5682 Backlog NODE-6490 Needs Triage MOTOR-1401 Duplicate PYTHON-4937 Backlog PHPLIB-1579 Fixed 1.21.0 RUBY-3581 Backlog RUST-2084 Backlog

      Summary

      The $$type operator is intended to support all types for the server's $type query operator. I recently discovered that PHPLIB never added support for the "number" alias and considered that other drivers might have forgotten as well.

      The alias doesn't appear in the documentation's main table of supported types but is instead discussed below in prose:

      $type supports the number alias, which will match against the following BSON types:

      • double
      • 32-bit integer
      • 64-bit integer
      • decimal

      I'd like to add a regression test for this behavior in the unified test format's directory of "valid" spec tests. This would ensure any future tests that may utilize the "number" alias can run on all drivers without requiring unexpected changes.

      Motivation

      Who is the affected end user?

      Drivers.

      How does this affect the end user?

      Spec test runners may not support all values for the $$type operator.

      How likely is it that this problem or use case will occur?

      Has yet to occur but may in the future.

      If the problem does occur, what are the consequences and how severe are they?

      Drivers might encounter an unexpected error when syncing a future spec test that utilizes the alias.

      Is this issue urgent?

      No.

      Is this ticket required by a downstream team?

      No.

      Is this ticket only for tests?

      Yes.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Andreas Braun Andreas Braun
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: