Closed mihaicodrean closed 3 months ago
I have narrowed it down to this commit: 10393dfbabd7bf2f9e191ce5113621effc58bc2c for #2551.
@maca88 & @bahusoid, can I please bring your attention to this, maybe you have an idea on how to address it?
@fredericDelaporte, I see that the "NHibernate (NHibernate Core)" check step in TeamCity is now failing as expected, for the contributed test. Is the merge just not possible in this case, e.g. can't really contribute failing tests?
Need to mark the test with [KnownBug] attribute
Need to mark the test with [KnownBug] attribute
Thanks Alex for pointing that out! Added.
Squashed and rebased on 5.4.x (11984a06), it does fail too. The same on the commit prior to #2551 succeeds, see 491e6da. So, it is confirmed it is a 5.4 regression. (And this has been introduced by #2551: I have checked it fails too when applying the test case onto 10393df.)
We should fix it on 5.4.x. As such, the test case needs to be rebased on 5.4.x and the PR needs to target the 5.4.x branch.
For fixing it, I think the troubles lies within SelectClause
, but I am not knowledgeable about that code.
I have narrowed it to this change, but have not yet devise a proper fix.
The above link points a comment in a long to load file in the review of the PR having introduced this change. Here is a direct link to current code involved in this bug: https://github.com/nhibernate/nhibernate-core/blob/d1790e7d3bb408346059e21279635fb7ac1a902d/src/NHibernate/Hql/Ast/ANTLR/Tree/SelectClause.cs#L497-L505 At the second column, the from is already added, causing the execution to go into the else and not rendering the second column.
In debug, forcing the execution to jump directly to RenderNonScalarIdentifiers (so, not adding again the from to combinedFromElements) allows the test to succeed.
I have now overridden your branch in order to target 5.4.x for a potential fix I have added.
In debug, forcing the execution to jump directly to RenderNonScalarIdentifiers (so, not adding again the from to combinedFromElements) allows the test to succeed.
Thanks much for identifying the root cause!
Hazzik and Maca, since the fix is actually from me, I will not approve this PR myself.
An dev package is available here. See also Nighlty builds for more instructions.
@mihaicodrean, may you check this dev package solves the issue for your application, and that none other regression remains?
@mihaicodrean, may you check this dev package solves the issue for your application, and that none other regression remains?
Thanks for the fix! I have applied the patch to my local 5.5.0 branch, and all works as expected for me.
This works in 5.3.3, for example, but not in 5.5.0. Thoughts as to why / how to fix?
Here's the failing test message:
And the stack trace:
And the standard output: