Skip to content

Commit

Permalink
support more aggregation operators when generating native query confi…
Browse files Browse the repository at this point in the history
…gurations (#120)

Adds or refines support for these operators:

Arithmetic Expression Operators

- `$abs`
- `$add`
- `$divide`
- `$multiply`
- `$subtract`

Array Expression Operators

- `$arrayElemAt`

Boolean Expression Operators

- `$and`
- `$not`
- `$or`

Comparison Expression Operators

- `$eq`
- `$gt`
- `$gte`
- `$lt`
- `$lte`
- `$ne`

Set Expression Operators

- `$allElementsTrue`
- `$anyElementTrue`

String Expression Operators

- `$split`

Trigonometry Expression Operators

- `$sin`
- `$cos`
- `$tan`
- `$asin`
- `$acos`
- `$atan`
- `$asinh`
- `$acosh`
- `$atanh`
- `$sinh`
- `$cosh`
- `$tanh`

Accumulators (`$group`, `$bucket`, `$bucketAuto`, `$setWindowFields`)

- `$avg`
- `$count`
- `$max`
- `$min`
- `$push`
- `$sum`

Also improves type inference to make all of these operators work.

This is work an an in-progress feature that is gated behind a feature flag, `native-query-subcommand`
  • Loading branch information
hallettj authored Nov 19, 2024
1 parent 9799576 commit 1577927
Show file tree
Hide file tree
Showing 19 changed files with 1,698 additions and 677 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ mongodb-support = { path = "../mongodb-support" }

anyhow = "1.0.80"
clap = { version = "4.5.1", features = ["derive", "env"] }
enum-iterator = "^2.0.0"
futures-util = "0.3.28"
indexmap = { workspace = true }
itertools = { workspace = true }
Expand Down
280 changes: 280 additions & 0 deletions crates/cli/src/native_query/aggregation-operator-progress.md

Large diffs are not rendered by default.

Loading

0 comments on commit 1577927

Please sign in to comment.