Skip to content

Conversation

@beikov
Copy link
Member

@beikov beikov commented Feb 4, 2022

No description provided.

@hibernate-github-bot
Copy link

hibernate-github-bot bot commented Feb 4, 2022

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: [ae021cf, 64fb349]

› This message was automatically generated.

@beikov beikov changed the title test showing maxindex() / maxelement() broken Test and fix for maxindex() / maxelement() issues in select clause Feb 4, 2022
@beikov beikov merged commit dc65d04 into hibernate:main Feb 7, 2022
@beikov beikov deleted the max_hql_bug branch February 7, 2022 11:07
@gavinking
Copy link
Member

@beikov this did not fix the problem. There is still an unnecessary join.

For example:

select maxindex(eol.listOfBasics) from EntityOfLists eol

results in:

select
        (select
            max(l2_0.listOfBasics_ORDER) 
        from
            EntityOfLists_basic l2_0 
        where
            e1_0.id=l2_0.EntityOfLists_id) 
    from
        EntityOfLists e1_0 
    join
        EntityOfLists_basic l1_0 
            on e1_0.id=l1_0.EntityOfLists_id

@beikov
Copy link
Member Author

beikov commented Feb 7, 2022

Thanks for the notice. I'll look into that.

@beikov
Copy link
Member Author

beikov commented Feb 8, 2022

See #4798 for the fix

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.

2 participants