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

Fix catListTable and friends #61

Merged
merged 1 commit into from
Jun 22, 2021
Merged

Fix catListTable and friends #61

merged 1 commit into from
Jun 22, 2021

Conversation

shane-circuithub
Copy link
Contributor

@shane-circuithub shane-circuithub commented Jun 19, 2021

The implementation before would produce incorrect results if tried to get the cartesian product of two queries built out of unnest. Which makes sense, because Postgres seems to special case products of unnest to have a ZipList semantics rather than the normal [].

The solution is to use rebind (so naturally this depends on #56) to rebind the results of such queries, so there is no unnest in the expressions we're <*>ing.

@ocharles
Copy link
Contributor

Approved, but could you write a test?

Base automatically changed from eval to master June 22, 2021 10:51
The implemtation before would produce incorrect results if tried to get the cartesian product of two queries built out of `unnest`. Which makes sense, because Postgres seems to special case products of `unnest` to have a `ZipList` semantics rather than the normal `[]`.

The solution is to use `rebind` (from `Rel8.Query.Evaluate`) to rebind the results of such queries, so there is no `unnest` in the expressions we're `<*>`ing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants