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

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

    • Needed

      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:
            Unassigned Unassigned
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: