fix: support joins that do not require strict equality#29251
fix: support joins that do not require strict equality#29251jacek-prisma merged 5 commits intomainfrom
Conversation
WalkthroughAdds 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
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (6)
packages/client-engine-runtime/src/interpreter/in-memory-processing.tspackages/client-engine-runtime/src/interpreter/query-interpreter.tspackages/client-engine-runtime/src/query-plan.tspackages/client/tests/functional/issues/29122-mysql-bigint-view-relation/_matrix.tspackages/client/tests/functional/issues/29122-mysql-bigint-view-relation/prisma/_schema.tspackages/client/tests/functional/issues/29122-mysql-bigint-view-relation/tests.ts
packages/client/tests/functional/issues/29122-mysql-bigint-view-relation/tests.ts
Show resolved
Hide resolved
size-limit report 📦
|
|
🟢 All good, this PR is no longer uses custom engine. |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (3)
packages/client-engine-runtime/bench/sample-query-plans.tspackages/client-engine-runtime/src/interpreter/in-memory-processing.tspackages/client/tests/functional/issues/29122-mysql-bigint-view-relation/tests.ts
packages/client-engine-runtime/src/interpreter/query-interpreter.ts
Outdated
Show resolved
Hide resolved
[TML-1868](https://linear.app/prisma-company/issue/TML-1868/fix-mysql-bigint-relation-issue) /prisma-branch fix/strict-equality-joins Client PR: prisma/prisma#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.
Actionable comments posted: 1
ℹ️ Review info
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (9)
packages/client-engine-runtime/src/interpreter/query-interpreter.tspackages/client-generator-js/package.jsonpackages/client-generator-ts/package.jsonpackages/client/package.jsonpackages/engines/package.jsonpackages/fetch-engine/package.jsonpackages/internals/package.jsonpackages/migrate/package.jsonpackages/schema-files-loader/package.json
[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 <prismabots@gmail.com>
TML-1868
Adds support for a new
canAssumeStrictEqualityflag 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
Tests
Chores