Fix ESCAPE clause for Azure Synapse.#34463
Fix ESCAPE clause for Azure Synapse.#34463cincuranet merged 4 commits intodotnet:mainfrom cincuranet:escape-synapse
Conversation
roji
left a comment
There was a problem hiding this comment.
This looks like it just omits the ESCAPE clause for Synapse; doesn't that mean that bad results would be returned? In other words, the ESCAPE isn't needed to get the correct results, why do we have it there in the first place?
I think the fix needed here is to vary our translation for Synapse, translating to correct (but inferior) SQL which doesn't depend on LIKE+ESCAPE. You can look at pre-8.0 EF to see what we were doing (as this is a regression in 8.0).
|
I took the previous translation and put it into |
roji
left a comment
There was a problem hiding this comment.
If I look at the existing TryTranslateStartsEndsWithContains, doesn't the default case ("The pattern is a column or a complex expression") already contain exactly the logic we need? Any particular reason to duplicate the entire function for Synapse, rather than just jump to that case whenever we're on Synapse and would need to use ESCAPE? I don't really see any risk problem here...
|
Now it's using the code from the original |
|
/backport to release/9.0 |
Fixes #33555