Bug description
Prisma client panics on queries of float values over ~ 7.922e+28
How to reproduce
I had originally tried this on version prisma version 2.1.3:
anything over ~9.223e+18
- Connect prisma to a table with a column of type "Double Precision" (float8)
- Use a FindMany, FindOne, or $queryRaw to query on that table
- Manually (sql) set a float value on one of the tables as 7.922e+28. This value should return from query as intended
- Manually (sql) set a float value as 7.923e+28. This value will cause a panic with the error message:
"Invalid `prisma.stat.findOne()` invocation in\n/app/src/allTypes/queries/....
PANIC: f64 is not a Decimal: Error { message: "Invalid decimal: overflow from scale mismatch" }
This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic."
Expected behavior
Large decimal values should return as in step 3 of 'How to reproduce'.
Prisma information
Table/Column in question looks like:
model Stat {
...
healthPoints Float? @map("health_points")
...
@map("stat")
}
Environment & setup
- OS: Linux Debian (node:14-buster-slim docker image)
- Database: PostgreSQL
- Node.js version: 14
- Prisma version: 2.9.0
Bug description
Prisma client panics on queries of float values over ~ 7.922e+28
How to reproduce
I had originally tried this on version prisma version 2.1.3:
anything over ~9.223e+18
Expected behavior
Large decimal values should return as in step 3 of 'How to reproduce'.
Prisma information
Table/Column in question looks like:
Environment & setup