Add $bucketAuto aggregation stage compatibility tests - #675
Merged
eerxuan merged 2 commits intoJul 13, 2026
Conversation
|
🤖 Auto-triaged by documentdb-triage-tool. Applied: Reasoningcomponent from path globs (test-coverage, test-framework); effort from diff stats (2139+0 LOC, 12 files); LLM: Adds 141 new compatibility test cases across 10 files covering the $bucketAuto aggregation stage, plus framework-level additions to error_codes.py and test_constants.py, touching multiple files across the test-coverage component. If a label is wrong, remove it manually and ping |
jingyaog
force-pushed
the
test/bucketAuto-compatibility-tests
branch
from
July 10, 2026 00:37
09611aa to
f813fbf
Compare
eerxuan
reviewed
Jul 10, 2026
Add compatibility test coverage for the $bucketAuto aggregation stage across core distribution semantics, boundary/type preservation, buckets and groupBy validation, granularity series, output specification, output and accumulator error propagation, and multi-stage interactions. Framework additions: - error_codes.py: $bucketAuto error-code constants (40239-40246, 40257-40261) - test_constants.py: GRANULARITY_VALUES preferred-number series Signed-off-by: Aaron Gong <jingyaog@amazon.com>
jingyaog
force-pushed
the
test/bucketAuto-compatibility-tests
branch
from
July 13, 2026 18:53
f813fbf to
c584134
Compare
eerxuan
approved these changes
Jul 13, 2026
RyanGarfinkel
pushed a commit
to RyanGarfinkel/functional-tests
that referenced
this pull request
Jul 20, 2026
Signed-off-by: Aaron Gong <jingyaog@amazon.com> Signed-off-by: RyanGarfinkel <113050972+RyanGarfinkel@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature being tested
The
$bucketAutoaggregation stage — automatic bucketing of documents into aspecified number of buckets based on a
groupByexpression, with even documentdistribution, boundary/type preservation, optional preferred-number
granularityseries, and per-bucket
outputaccumulators.Test cases
139 test cases across 10 files:
bucketAuto/test_bucketAuto_core_semantics.pybucketAuto/test_bucketAuto_boundaries.pybucketAuto/test_bucketAuto_buckets_validation.pybucketsaccepts int32/int64/whole-double/whole-Decimal128/1; rejects 0/negative/fractional/NaN/Infinity/overflow/non-numeric typesbucketAuto/test_bucketAuto_groupby.pygroupByexpression types, null/missing groupingbucketAuto/test_bucketAuto_arg_errors.pybucketAuto/test_bucketAuto_granularity.pybucketAuto/test_bucketAuto_output.py{$sum:1}, empty output, multiple accumulators, input-vs-sibling refs, nested expressions,$pushwith$$ROOT/$$CURRENT/$$REMOVE, special/duplicate field namesbucketAuto/test_bucketAuto_output_errors.py$-prefix, dotted names, non-accumulator valuesbucketAuto/test_bucketAuto_accumulator_errors.pystages/test_stages_position_bucketAuto.pystages/folder per FOLDER_STRUCTURE.mdFramework additions:
error_codes.py—$bucketAutoerror-code constants (40239–40246, 40257–40261)test_constants.py—GRANULARITY_VALUESpreferred-number series listMongoDB 8.2 documentation
output)TEST_COVERAGE.md guideline updates
None. No changes to
TEST_COVERAGE.mdwere required — the existing §15 (pipelinestages) and §18 (accumulators, which already names
$bucketAuto) already scope thisfeature. The new error-code constants and
GRANULARITY_VALUESare additive frameworksupport and did not warrant new rule text.