GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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

@jacek-prisma jacek-prisma commented Feb 25, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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
All reactions
  • 👍 1 reaction
@jacek-prisma
fix: support joins that do not require strict equality
8abc803
@coderabbitai

coderabbitai Bot commented Feb 25, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

  • aqrln
🚥 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
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands and usage tips.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jacek-prisma jacek-prisma mentioned this pull request Feb 25, 2026
feat: return a can_assume_strict_equality for in-memory joins prisma/prisma-engines#5785
Merged
coderabbitai[bot]
coderabbitai Bot reviewed Feb 25, 2026
View reviewed changes

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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.

All reactions
Comment thread packages/client-engine-runtime/src/interpreter/query-interpreter.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/client-engine-runtime/src/interpreter/query-interpreter.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread packages/client/tests/functional/issues/29122-mysql-bigint-view-relation/tests.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Feb 25, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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% 🔺)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Feb 25, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

🟢 All good, this PR is no longer uses custom engine.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jacek-prisma
chore: address a few minor issues
f1af039
coderabbitai[bot]
coderabbitai Bot reviewed Feb 25, 2026
View reviewed changes

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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.

All reactions
Comment thread packages/client-engine-runtime/src/interpreter/in-memory-processing.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@jacek-prisma
fix: camel case error_identifier
86ea036
aqrln
aqrln reviewed Feb 27, 2026
View reviewed changes
Comment thread packages/client-engine-runtime/src/interpreter/query-interpreter.ts Resolved

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
@jacek-prisma
feat: return a can_assume_strict_equality for in-memory joins (#5785)
94a226b
[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 -->
prisma-bot and others added 2 commits February 27, 2026 08:58
@prisma-bot @jacek-prisma
chore(deps): update engines to 7.5.0-10.94a226be1cf2967af2541cca5529f…
b33187a
…0f7ba866919
@jacek-prisma
chore: address comment
61e8d9c
coderabbitai[bot]
coderabbitai Bot reviewed Feb 27, 2026
View reviewed changes

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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.

All reactions
Comment thread packages/client-engine-runtime/src/interpreter/query-interpreter.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@jacek-prisma
jacek-prisma requested a review from aqrln February 27, 2026 11:46
aqrln
aqrln approved these changes Feb 27, 2026
View reviewed changes
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Feb 27, 2026
@jacek-prisma
jacek-prisma merged commit 90d119c into main Feb 27, 2026
493 of 497 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@jacek-prisma
jacek-prisma deleted the fix/strict-equality-joins branch February 27, 2026 13:39
jacek-prisma added a commit that referenced this pull request Feb 27, 2026
@jacek-prisma @prisma-bot
fix: support joins that do not require strict equality (#29251)
8bbf1ed
[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]>
@tensordreams tensordreams mentioned this pull request Jul 22, 2026
perf: purified plans #29004
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@coderabbitai coderabbitai[bot] coderabbitai[bot] left review comments
@aqrln 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

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

View relations broken in Prisma v7 when MySQL view returns BIGINT from subquery

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@jacek-prisma @aqrln @prisma-bot
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.