Skip to content

Conversation

@gavinking
Copy link
Member

Yet another rebase of #10323 to resolve conflicts and run tests.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Jun 16, 2025

Thanks for your pull request!

This pull request does not follow the contribution rules. Could you have a look?

❌ All commit messages should start with a JIRA issue key matching pattern HHH-\d+
    ↳ Offending commits: [0a9385d]

› This message was automatically generated.

…r SQM nodes

- finally enables efficient caching of criteria query plans
- also reconsider how alias generation is done - aliases should only
  be unique to a given query, NOT globally unique, since that results
  in interpretation cache misses
- ran into and fixed several other problems along the way
- note that the previous solution based on translating to HQL was not
  working at all, partly because the translation to HQL is not very
  correct - but anyway this is more efficient, since hashCodes are
  in general more flexible from an efficiency perspective
- there is still a remaining problem where NavigablePaths elements
  are assigned globally unique aliases resulting in cache misses
…oblem

- just deprecate the method, since HQL doesn't allow anonymous CTEs
- perhaps we need to do the same for the withRescursiveXxxxx() methods
- I don't really see a better fix, since nested CTEs can be composed
  before composing them with the outer query (perhaps we could modify
  the aliases of all CTEs after the whole query is built)
Oracle disapproves of aliases of form "_1"
@gavinking gavinking force-pushed the criteria-plan-caching-fourth-rebase branch from 3d769a9 to f49d209 Compare June 16, 2025 20:27
@gavinking
Copy link
Member Author

I'm going to finally merge this one now.

Follow-up issues are documented in https://hibernate.atlassian.net/issues/HHH-19556.

@gavinking gavinking merged commit 518ddb7 into hibernate:main Jun 19, 2025
23 of 25 checks passed
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.

1 participant