[DRIVERS-2467] Regression test for "number" alias in $$type operator Created: 10/Oct/22  Updated: 06/Jan/23

Status: Backlog
Project: Drivers
Component/s: Unified Test Runner
Fix Version/s: None

Type: Task Priority: Trivial - P5
Reporter: Jeremy Mikola Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to PHPLIB-1001 Support "number" alias for $$type spe... Closed
Driver Changes: Needed

 Description   

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.


Generated at Thu Feb 08 08:25:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.