Skip to content

Fix catListTable and friends#61

Merged
shane-circuithub merged 1 commit intomasterfrom
fix-catlist
Jun 22, 2021
Merged

Fix catListTable and friends#61
shane-circuithub merged 1 commit intomasterfrom
fix-catlist

Conversation

@shane-circuithub
Copy link
Copy Markdown
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
Copy Markdown
Contributor

Approved, but could you write a test?

@shane-circuithub shane-circuithub force-pushed the eval branch 2 times, most recently from 4a20dd3 to d630639 Compare June 22, 2021 10:50
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.
@shane-circuithub shane-circuithub merged commit bac704c into master Jun 22, 2021
@shane-circuithub shane-circuithub deleted the fix-catlist branch June 22, 2021 11:48
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.

2 participants