Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qe: filter out unique criteria containing an unsupported field #3960

Merged
merged 1 commit into from
May 8, 2023

Conversation

tomhoule
Copy link
Contributor

@tomhoule tomhoule commented May 8, 2023

They are not usable by the query engine, and currently cause crashes whenever querying the model containing them.

closes prisma/prisma#18517

@tomhoule tomhoule added this to the 4.14.0 milestone May 8, 2023
@tomhoule tomhoule force-pushed the query-engine-prisma-18517 branch from ad689bc to c5d211e Compare May 8, 2023 08:19
@codspeed-hq
Copy link

codspeed-hq bot commented May 8, 2023

CodSpeed Performance Report

Merging #3960 query-engine-prisma-18517 (c29f5c5) will not alter performances.

Summary

🔥 0 improvements
❌ 0 regressions
✅ 11 untouched benchmarks

🆕 0 new benchmarks
⁉️ 0 dropped benchmarks

@tomhoule tomhoule marked this pull request as ready for review May 8, 2023 08:39
@tomhoule tomhoule requested a review from a team May 8, 2023 08:39
query-engine/connector-test-kit-rs/README.md Show resolved Hide resolved
@@ -54,6 +54,9 @@ impl Model {
}

pub fn unique_indexes(&self) -> impl Iterator<Item = walkers::IndexWalker<'_>> {
self.walker().indexes().filter(|idx| idx.is_unique())
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

They are not usable by the query engine, and currently cause crashes
whenever querying the model containing them.

closes prisma/prisma#18517
@tomhoule tomhoule force-pushed the query-engine-prisma-18517 branch from c5d211e to c29f5c5 Compare May 8, 2023 09:40
@tomhoule tomhoule merged commit b941a1d into main May 8, 2023
29 checks passed
@tomhoule tomhoule deleted the query-engine-prisma-18517 branch May 8, 2023 10:20
aqrln added a commit that referenced this pull request Sep 8, 2023
Fix DMMF generation for schemas with compound `@@id` or `@@unique` that
contain unsupported fields. Previously DMMF generation would panic with

```
unreachable code: No unsupported field should reach that path',
query-engine/schema-builder/src/input_types/mod.rs:26:40
```

The issue with compound unique was re-introduced in
Prisma 4.16 in #3977 after
being previously fixed in Prisma 4.14 in
#3960.

The issue with compound id is a new one, and is reproducible with Prisma
4.14 as well.

Fixes: prisma/prisma#20986
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants