[SERVER-78092] Add a $error aggregate expression Created: 14/Jun/23  Updated: 26/Dec/23

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Arun Banala Assignee: Backlog - Query Integration
Resolution: Unresolved Votes: 0
Labels: query-product-scope-1, query-product-urgency-2, query-product-value-2, query-skunkworks
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Integration
Participants:

 Description   

The current query language does not provide any syntax to stop pipeline execution and fail fast. A common case could be that users don't expect to see null values for a certain field and want to throw an error for those cases instead of ignoring them



 Comments   
Comment by Katya Kamenieva [ 03/Jul/23 ]

I think we could address the use case by supporting $validate stage that was introduced in Atlas Streams
Something like

{
    $validate: {
      validator: <filter>,
      validationAction: "error"|"discard",
      logAttributes: <projection for custom log message>
    }
  }

Comment by Davis Haupt (Inactive) [ 15/Jun/23 ]

Another potential name could be $panic?

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