Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *updated* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNjRmMTM3YTA2...
) / Improvement (
https://hibernate.atlassian.net/browse/HHH-15719?atlOrigin=eyJpIjoiNjRmMT...
) HHH-15719 (
https://hibernate.atlassian.net/browse/HHH-15719?atlOrigin=eyJpIjoiNjRmMT...
) Hint UniqueSematics.NONE for entity queries without collection join fetches (
https://hibernate.atlassian.net/browse/HHH-15719?atlOrigin=eyJpIjoiNjRmMT...
)
Change By: Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
In the constructor of {{org.hibernate.query.sqm.internal.ConcreteSqmSelectQueryPlan}} we
currently always choose {{ListResultsConsumer.UniqueSemantic.ALLOW}}, but it would be
better to use this instead:
{ noformat {NONE } sqm } if we know for sure that the cardinality is preserved.
containsCollectionFetches()
? ListResultsConsumer.UniqueSemantic.ALLOW
: ListResultsConsumer.UniqueSemantic.NONE{noformat}
The deduplication showed up on some flame graphs and I realized that in that particular
case it is not even necessary, because only collection join fetches alter the cardinality
such that duplicates are possible. Maybe non-attribute joins could alter the cardinality
as well, so it might be worth being pessimistic about this for now. We could detect some
non-cardinality altering cases though if we want.
(
https://hibernate.atlassian.net/browse/HHH-15719#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15719#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100210- sha1:9b34d7c )