[DOCS-12936] Investigate changes in SERVER-34373: create an expression to test if expression type is numerical Created: 01/Aug/19  Updated: 13/Nov/23  Resolved: 28/Jan/20

Status: Closed
Project: Documentation
Component/s: Server
Affects Version/s: None
Fix Version/s: 4.3.1, Server_Docs_20231030, Server_Docs_20231106, Server_Docs_20231105, Server_Docs_20231113

Type: Task Priority: Major - P3
Reporter: Backlog - Core Eng Program Management Team Assignee: Ravind Kumar (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-34373 create an expression to test if expre... Closed
Related
Participants:
Days since reply: 4 years, 2 weeks, 2 days ago
Epic Link: DOCS: 4.4 Server Release Work

 Description   

Description

SERVER ticket description:

Currently to determine if type of expression is a number you have to do this:

{$in:[ {$type:"$expression"}, ["int", "long", "double", "decimal"] ]}

It would be nice to have shorthand syntax for this test. Maybe $isNumeric or $isNumber?

Note that query/matcher already supports {a:{$type:"number"}} but not agg.

Change Description:

A new expression, $isNumber, was added to the aggregation expression language. It takes a single expression as an unnamed argument; the format is: {$isNumber: <expression>}. It returns true if the expression evaluates to an int, double, decimal, or long, and false otherwise.

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Githook User [ 27/Jan/20 ]

Author:

{'email': 'ravind.kumar@mongodb.com', 'name': 'Ravind Kumar'}

Message: DOCS-12936: [v4.4] new aggregation operator
Branch: master
https://github.com/mongodb/docs/commit/093ade781d8adf48eb6456412d944bf5a214316c

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