-
-
Notifications
You must be signed in to change notification settings - Fork 19
Description
The test suite for ZenStack LIVE compares its results by running an actual query against a database and seeing if it matches the expected result. I've upgraded to ^3.3.0 and some tests now fail that previously passed.
All of the errors look like they're related to arrays, and they appear similar to this:
Failed to execute query: error: operator does not exist: real[] @> double precision[]
Here's a sample query
client.user.exists({
where: {
floatArray: {
equals: [1.1, 2.2, 3.3],
},
},
})Here's the generated SQL
select exists (select 1 as "$t" from "User" where "User"."floatArray" = cast(ARRAY[$1,$2,$3] as double precision[])) as "exists"Here's a reproduction (run the Vitest suite)
https://github.com/visualbravo/zenstack-live/tree/incorrect-sql
Here's where the tests were passing before updating to ^3.3.0
https://github.com/visualbravo/zenstack-live/actions/runs/21591495912/job/62212519618
I placed a try/catch in the discriminator test suite on line 75 to aid in debugging.
It looks like there's some sort of casting issue.