Fixing a problem with an OP_CONCAT in WhenExpression#1837
Fixing a problem with an OP_CONCAT in WhenExpression#1837manticore-projects merged 4 commits intoJSQLParser:masterfrom
Conversation
|
Thank you for your contribution. If also do not understand why you would like to catch |
I'm sorry for tests, for some reason some tests have been failed in my environment. I'll try to fix it asap. Which build system should I use? Gradle or Maven? About your second question. If I understand incorrectly, please tell me and I'll find another solution |
|
I've fixed tests, but the solution of my core problem has changed. I think, It will be a bit slower then previous, but THEN part in The problem has been occurred because the |
From what I can see, your fix is likely correct since we need to always test the most complex possible interpretation first. Example: |
|
You're right. I forgot to delete |
|
Could you explain me, why did you close the PR? I really need the fix this problem. If my fix is not correct by performance reasons I'll try to fix it in some another way. As an example I can try to rewrite the concat function to solve this problem. It will be a bit more complex but it will work faster |
|
Apologies, I actually believed to have MERGED it! |
|
Thank you, please wait for 5 min, I'll delete |
Version: 4.7-SNAPSHOT
The problem was in an ELSE part of the WHEN expression. When we had a sub WHEN in ELSE and concatenate it with some another string:
CASE WHEN 1 = 2 THEN 'string1' ELSE CASE WHEN 2 = 3 THEN 'string2' ELSE 'first part' END || 'second part' END