You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While the dialect's lack of support for this query semantics is debatable (I can see how they reject the query. Things get hairy when outer joins are nested even further), it's probably better for jOOQ to generate this query, instead:
selecta.ID,
(
select (
selectcount(distinct alias_122359416.NAME)
fromTEST.T_BOOKas alias_52818137
left outer joinTEST.T_BOOK_TO_BOOK_STOREas alias_73255154
onalias_73255154.BOOK_ID=alias_52818137.IDleft outer joinTEST.T_BOOK_STOREas alias_122359416
onalias_73255154.BOOK_STORE_NAME=alias_122359416.NAME
)
fromSYSIBM.SYSDUMMY1wherealias_52818137.AUTHOR_ID=a.ID-- Correlation here
)
fromTEST.T_AUTHORas a
order bya.ID
The text was updated successfully, but these errors were encountered:
The new implicit path correlation feature that was introduced with jOOQ 3.19 has a problem when the path correlation is composed of multiple path joins:
https://www.jooq.org/doc/dev/manual/sql-building/sql-statements/select-statement/implicit-path-correlation/
Consider this integration test query:
It produces a weird
LEFT JOIN
correlation predicate in theLEFT JOIN
'sON
clause rather than theWHERE
clause:This isn't supported in numerous dialects, including:
These dialects seem to return wrong results (sometimes):
While the dialect's lack of support for this query semantics is debatable (I can see how they reject the query. Things get hairy when outer joins are nested even further), it's probably better for jOOQ to generate this query, instead:
The text was updated successfully, but these errors were encountered: