This is a bug-fix release. All four issues were found by running mdbplyr
against a live MongoDB server rather than only against mocked collections, and
each is covered by a new regression test.
filter() with multiple predicates (e.g. filter(cond1, cond2))
compiling $and as a JSON object with numeric-string keys instead of an
array, which MongoDB silently treated as a no-op filter.is.na() compiling to a bare $eq against null, which does not
match a genuinely missing field under MongoDB's $expr semantics; it now
compiles through $ifNull first.<, <=, >, >=, !=), !, and if_else() matching
rows with a missing operand, because BSON sort order places missing/null
below every number. Comparisons involving a field now compile with an
NA-propagation guard so they drop or return NA for missing values the
same way dplyr does.unwind_array() and flatten_fields() rejecting a nested array root
(e.g. message.measurements) that infer_schema() only ever registers
through its scalar leaves (message.measurements.Fx and so on). Both now
resolve such paths directly, matching select()'s existing support for
nested root paths.This release expands the lazy MongoDB translation layer introduced in
v0.3.0, moving mdbplyr from a small core verb subset to a broader analytical
backend with joins, window functions, richer summaries, and schema-aware
selection helpers.
inner_join(), left_join(), semi_join(), and anti_join() methods
for tbl_mongo.$lookup pipelines. Mutating joins flatten matches by
default with $lookup, $unwind, and $replaceRoot; unnest = FALSE keeps
matches as a nested array column.tbl_mongo collection reference with a known schema in the same
database.select() now supports name-based tidyselect helpers when the schema is
known: starts_with(), ends_with(), contains(), matches(),
everything(), all_of(), any_of(), ranges, and negation.select() still rejects where() because column types are unknown without
reading data.coalesce() is now translated in scalar expressions and compiles to nested
MongoDB $ifNull expressions.row_number() is available as an alias for the existing 1:n()
row-numbering idiom in mutate() and transmute().group_by() now supports named computed grouping keys, such as
group_by(bucket = floor(amount / 10)).summarise() gained sd(), var(), first(), last(), and
n_distinct().median() and quantile() are supported on MongoDB 7.0 or newer through
MongoDB's percentile accumulator.across() support in mutate() and summarise().select() helper support.~ lambdas, with optional
.names templates.across() deliberately does not support where(), anonymous functions, or
functions stored in variables.mutate() and transmute() via
MongoDB $setWindowFields.rank(), min_rank(), and dense_rank().cumsum(), cummean(), cummax(), and
cummin().lag() and lead().arrange().mongo_src() and tbl_mongo() now accept an optional server_version
argument.mongo_src() probes the connected MongoDB server with
buildInfo.mongo_server_version() for mongo_src and tbl_mongo objects.mutate() assignments now compile in user order, so later expressions can
refer to fields created earlier in the same call.select() regression involving nested root paths.