GeezerVison is showing github.com — fix: support joins that do not require strict equality by jacek-prisma · Pull Request #29251 · prisma/orm
Conversation
jacek-prisma
commented
Feb 25, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
TML-1868
Adds support for a new canAssumeStrictEquality flag used for in-memory joins. When it's set to false, we infer the type of the key present on the parent rows and inject casts for children rows. Fixes some MySQL edge cases.
Fixes #29122
Engine PR: prisma/prisma-engines#5785
Summary by CodeRabbit
-
Bug Fixes
- Improved join key matching with optional per-field value mapping/type casting and a new flag to control strict-equality assumptions.
- Standardized validation error identifiers to camelCase for more consistent error reporting.
-
Tests
- Added MySQL-only functional tests for view relations with large BigInt keys.
-
Chores
- Updated internal engine/tooling version references.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
solokhind reacted with thumbs up emoji
coderabbitai
Bot
commented
Feb 25, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Walkthrough
Adds optional per-field mappers for record key generation and threads a new canAssumeStrictEquality flag through query planning and interpretation to enable inferred key casts. Renames validation error property to camelCase. Adds MySQL BIGINT view-relation functional tests and updates sample query plans and some dependency versions.
Changes
| Cohort / File(s) |
Summary |
Record key generation packages/client-engine-runtime/src/interpreter/in-memory-processing.ts |
getRecordKey signature extended to accept mappers?: ((value: unknown)=>unknown)[]; applies per-field mapper (preserving null) when present before JSON-stringifying the key. |
Query interpreter & key-casting logic packages/client-engine-runtime/src/interpreter/query-interpreter.ts |
attachChildrenToParents gains canAssumeStrictEquality: boolean; adds inferKeyCasts(rows, keys) returning per-key cast functions; uses mappers when strict equality cannot be assumed; refactors parent/child key handling. |
Query plan shape & errors packages/client-engine-runtime/src/query-plan.ts |
QueryPlanNode join args now include canAssumeStrictEquality: boolean. ValidationError variants renamed field error_identifier → errorIdentifier. |
Validation helpers packages/client-engine-runtime/src/interpreter/validation.ts |
Switched to error.errorIdentifier in renderMessage and getErrorCode; logic unchanged otherwise. |
Bench sample plans packages/client-engine-runtime/bench/sample-query-plans.ts |
Added canAssumeStrictEquality: true across multiple join nodes in sample/benchmark plans. |
Functional tests (MySQL BIGINT view relation) packages/client/tests/functional/issues/29122-mysql-bigint-view-relation/_matrix.ts, packages/client/tests/functional/issues/29122-mysql-bigint-view-relation/prisma/_schema.ts, packages/client/tests/functional/issues/29122-mysql-bigint-view-relation/tests.ts |
Adds MySQL-only test matrix, Prisma schema with a view exposing BIGINT keys, and regression test validating view-relation behavior with bigint keys. |
Dependency bumps packages/*/package.json (multiple) packages/client-generator-js/package.json, packages/client-generator-ts/package.json, packages/client/package.json, packages/engines/package.json, packages/fetch-engine/package.json, packages/internals/package.json, packages/migrate/package.json, packages/schema-files-loader/package.json |
Bumped various @prisma/* engine/schema dependency versions to 7.5.0-10... across several package.json files; no code behavior changes. |
Suggested labels
lgtm
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name |
Status |
Explanation |
Resolution |
| Docstring Coverage |
⚠️ Warning |
Docstring coverage is 12.50% which is insufficient. The required threshold is 80.00%. |
Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
| Check name |
Status |
Explanation |
| Description Check |
✅ Passed |
Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check |
✅ Passed |
The title 'fix: support joins that do not require strict equality' accurately describes the main change enabling non-strict equality joins for type mismatches. |
| Linked Issues check |
✅ Passed |
The PR implements all key objectives: adds canAssumeStrictEquality flag for in-memory joins, infers key type casts when strict equality cannot be assumed, and enables correct relation matching despite database type mismatches to fix issue #29122. |
| Out of Scope Changes check |
✅ Passed |
Besides the main scope, the PR includes error_identifier to errorIdentifier renaming in query-plan.ts and validation.ts, which is tangential to the join equality feature but supports the overall schema consistency improvements. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
- 📝 Generate docstrings (stacked PR)
- 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Post copyable unit tests in a comment
- Commit unit tests in branch
fix/strict-equality-joins
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment @coderabbitai help to get the list of available commands and usage tips.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
ℹ️ Review info
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between c33e8f8 and 8abc803.
📒 Files selected for processing (6)
packages/client-engine-runtime/src/interpreter/in-memory-processing.ts
packages/client-engine-runtime/src/interpreter/query-interpreter.ts
packages/client-engine-runtime/src/query-plan.ts
packages/client/tests/functional/issues/29122-mysql-bigint-view-relation/_matrix.ts
packages/client/tests/functional/issues/29122-mysql-bigint-view-relation/prisma/_schema.ts
packages/client/tests/functional/issues/29122-mysql-bigint-view-relation/tests.ts
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
size-limit report 📦
| Path |
Size |
| packages/client/runtime/index-browser.js |
2.23 KB (0%) |
| packages/client/runtime/index-browser.d.ts |
3.28 KB (0%) |
| packages/cli/build/index.js |
2.5 MB (+0.01% 🔺) |
| packages/client/prisma-client-0.0.0.tgz |
26.81 MB (+0.02% 🔺) |
| packages/cli/prisma-0.0.0.tgz |
12.84 MB (+0.02% 🔺) |
| packages/bundle-size/da-workers-libsql/output.tgz |
1.33 MB (+0.01% 🔺) |
| packages/bundle-size/da-workers-neon/output.tgz |
1.39 MB (+0.02% 🔺) |
| packages/bundle-size/da-workers-pg/output.tgz |
1.38 MB (+0.02% 🔺) |
| packages/bundle-size/da-workers-planetscale/output.tgz |
1.33 MB (+0.03% 🔺) |
| packages/bundle-size/da-workers-d1/output.tgz |
1.3 MB (+0.01% 🔺) |
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
🟢 All good, this PR is no longer uses custom engine.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
ℹ️ Review info
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 8abc803 and f1af039.
📒 Files selected for processing (3)
packages/client-engine-runtime/bench/sample-query-plans.ts
packages/client-engine-runtime/src/interpreter/in-memory-processing.ts
packages/client/tests/functional/issues/29122-mysql-bigint-view-relation/tests.ts
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
jacek-prisma
added a commit
to prisma/prisma-engines
that referenced
this pull request
Feb 27, 2026
[TML-1868](https://linear.app/prisma-company/issue/TML-1868/fix-mysql-bigint-relation-issue)
/prisma-branch fix/strict-equality-joins
Client PR: prisma/orm#29251
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Joins now carry a flag to enable stricter equality assumptions when
supported, improving cross-database join handling.
* Validation expressions include richer context for clearer error
reporting.
* **Chores**
* Connector implementations updated to advertise support for
strict-equality joins where applicable, enabling optimized query
generation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
ℹ️ Review info
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📥 Commits
Reviewing files that changed from the base of the PR and between 86ea036 and 61e8d9c.
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (9)
packages/client-engine-runtime/src/interpreter/query-interpreter.ts
packages/client-generator-js/package.json
packages/client-generator-ts/package.json
packages/client/package.json
packages/engines/package.json
packages/fetch-engine/package.json
packages/internals/package.json
packages/migrate/package.json
packages/schema-files-loader/package.json
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
jacek-prisma
added a commit
that referenced
this pull request
Feb 27, 2026
[TML-1868](https://linear.app/prisma-company/issue/TML-1868/fix-mysql-bigint-relation-issue)
Adds support for a new `canAssumeStrictEquality` flag used for in-memory
joins. When it's set to false, we infer the type of the key present on
the parent rows and inject casts for children rows. Fixes some MySQL
edge cases.
Fixes #29122
Engine PR: prisma/prisma-engines#5785
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved join key matching with optional per-field value mapping/type
casting and a new flag to control strict-equality assumptions.
* Standardized validation error identifiers to camelCase for more
consistent error reporting.
* **Tests**
* Added MySQL-only functional tests for view relations with large BigInt
keys.
* **Chores**
* Updated internal engine/tooling version references.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Prismo <[email protected]>
Reviewers
aqrln
aqrln approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
lgtm
This PR has been approved by a maintainer
Milestone
No milestone
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.
|