Do not render the reference ID and key columns if RN does not equal.#2290
Do not render the reference ID and key columns if RN does not equal.#2290chrshnv wants to merge 1 commit into
Conversation
Signed-off-by: Artemiy Chereshnevvv <chereshnevvv4real@gmail.com>
|
Hi, thanks for working on this. I previously commented on #2122 that I wanted to work on the issue, but I wasn’t able to follow up at the time. I recently came back to it and noticed this PR. While investigating the issue back then, I had also tried a similar change: rendering the reference id/key columns as However, the part I got stuck on was the PostgreSQL performance concern described in #2122. The generated query shape still seems to build the child inline views without restricting them to the selected root ids, so on large tables PostgreSQL can still scan/window over many unrelated child rows before the outer join. If that sounds reasonable, I’d like to work on the performance part as a follow-up PR, separately from this correctness fix. I’m happy to align with whatever direction the maintainers prefer. |
This PR ensures that the ID and key columns of the reference table are not rendered when
rndoes not match withsinglequeryloadingenabled.Closes #2122