Postgres backend produces incorrect results for empty fold lists
Closed this issue · 2 comments
chewselene commented
Turning on integrations tests in #953 uncovered a bug. This db-fiddle is modeled after the current output of this integration test. For Animal 4
, we expect to see the result {child_names: []}
, but instead get no results for Animal 4
.
chewselene commented
I think this can be solved with a LEFT JOIN
from the main selectable to the folded subquery? That is actually what we have written up in #535, but in implementation we used a JOIN
instead. See this db-fiddle. If so, the fix is a super easy change here! @bojanserafimov @obi1kenobi let me know what you think!
obi1kenobi commented
Looks good to me! Let's go for it 🙌