Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HHH-14397 (
https://hibernate.atlassian.net/browse/HHH-14397?atlOrigin=eyJpIjoiN2EwMm...
)
Re: Even with SQL Server 2019, the 2100 parameter limit is still being enforced (
https://hibernate.atlassian.net/browse/HHH-14397?atlOrigin=eyJpIjoiN2EwMm...
)
Thanks for the reference. This is indeed an interesting piece of documentation, but as far
as I understand it, we should be able to increase the value to 65,535 - 3 , because the
LHS of the IN predicate is a path that can be composed of 3 identifiers (catalog, table,
column).
Also, it’s nice that you changed the limit in the PR, but I’d like to see a test that
creates a list of size LIMIT * 2 to see that this actually works.
I think a simple test that just runs something like the following should be enough:
entityManager.createQuery( "select p from Person p where p.id in :ids" )
.setParameter( "ids", IntStream.range( 0, MAX_COUNT * 2 ).boxed().collect(
Collectors.toList() ) )
.getResultList()
);
You can take inspiration for this from e.g.
org.hibernate.orm.test.query.MaxInExpressionParameterPaddingTest
(
https://hibernate.atlassian.net/browse/HHH-14397#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-14397#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:1025071 )