Skip to content

SQL-3167: wasm process collection - #150

Merged
nicholascioli merged 19 commits into
mongodb:mainfrom
nicholascioli:wasm-process-collection
Jun 3, 2026
Merged

SQL-3167: wasm process collection#150
nicholascioli merged 19 commits into
mongodb:mainfrom
nicholascioli:wasm-process-collection

Conversation

@nicholascioli

Copy link
Copy Markdown
Collaborator

This PR adds a utility method for deriving a collection's schema linearly over its partitions. This should allow for single-threaded consumers to easily derive a schema for a collection without worrying about how to best split up the partitions or any other internal details.

If a consumer wishes to be more performant in how it processes the collection, it can always use the lower-level derive_schema_for_partition to do so.

Also, this PR is dependent on #148, so please review only the commits starting at "SQL-3167" and beyond. This PR will be rebased once the other PR is merged.

@nicholascioli nicholascioli self-assigned this May 22, 2026
@nicholascioli
nicholascioli force-pushed the wasm-process-collection branch 2 times, most recently from f4be03b to c7bb42b Compare May 29, 2026 16:58
@nicholascioli
nicholascioli marked this pull request as ready for review May 29, 2026 17:00
@nicholascioli
nicholascioli requested a review from a team as a code owner May 29, 2026 17:00
@nicholascioli

Copy link
Copy Markdown
Collaborator Author

The PR has been rebased and is ready for review.

@bucaojit bucaojit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I had one comment regarding the integration test to consider.

Comment thread mongosql/Cargo.toml Outdated
Comment thread schema-builder-library/tests/wasm/tests/common.ts Outdated

@jchemburkar jchemburkar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job with getting this to compile + adding the ts testing scaffolding! I just have some thoughts + questions on what exactly we should be testing

Comment thread schema-builder-library/src/data_service/wasm.rs
Comment thread schema-builder-library/tests/wasm/src/index.ts Outdated
Comment thread schema-builder-library/tests/wasm/src/index.ts Outdated
Comment thread schema-builder-library/tests/wasm/src/index.ts Outdated
Comment thread schema-builder-library/tests/wasm/src/index.ts Outdated
@nicholascioli
nicholascioli force-pushed the wasm-process-collection branch from 0409ea3 to b336e66 Compare June 3, 2026 15:11
@nicholascioli

Copy link
Copy Markdown
Collaborator Author

I've rebased against jchemburkar#5 to pull in changes needed to build. Once that gets merged, I'll rebase again.

@nicholascioli
nicholascioli requested a review from jchemburkar June 3, 2026 17:25

@jchemburkar jchemburkar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. have one more test case I think we could add. might be worth having claude do one final dead code / style pass for the JS code to make sure there's no loose ends. but no need to retag once that's all set 😁 !

Comment thread schema-builder-library/tests/wasm/tests/process_collection.test.ts
Comment thread schema-builder-library/tests/wasm/tests/process_collection.test.ts Outdated
nicholascioli and others added 15 commits June 3, 2026 14:58
This commit adds a utility method for linearly deriving a schema for a collection by splitting it into partitions and processing them one at a time.
This commit adds an integration test for verifying that a node context can still derive schemas for a collection. Note that this requires running the following command in the `schema_manager_library` folder to generate the needed files.

```sh
wasm-pack build --release --no-default-features --features wasm
```
Co-authored-by: Oliver Bucaojit <oliver.bucaojit@mongodb.com>
Co-authored-by: Jonathan Chemburkar <jonathan.chemburkar@mongodb.com>
Co-authored-by: Jonathan Chemburkar <jonathan.chemburkar@mongodb.com>
nicholascioli and others added 4 commits June 3, 2026 14:58
@nicholascioli
nicholascioli force-pushed the wasm-process-collection branch from 8fe6cab to 4b8ff6b Compare June 3, 2026 19:34
@nicholascioli
nicholascioli enabled auto-merge June 3, 2026 19:41
@nicholascioli
nicholascioli added this pull request to the merge queue Jun 3, 2026
Merged via the queue into mongodb:main with commit 9ffbc5a Jun 3, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants