[CALCITE-7667] Improve string-literal encoding in pushdown translators#5117
[CALCITE-7667] Improve string-literal encoding in pushdown translators#5117rubenada wants to merge 2 commits into
Conversation
Co-authored-by: bibi samina <sam@bugqore.com>
mihaibudiu
left a comment
There was a problem hiding this comment.
These look fine, but I don't really know the conventions of all these engines so I cannot tell whether the results are correct or some other important cases of characters that need to be escaped are missing. I hope that at least these test results were validated to be correct using a real engine. There is at least one test which used to have an incorrect expected result.
| + "from \"foodmart\".\"reserve_employee\""; | ||
| final String expectedStarRocks = "SELECT REGEXP_REPLACE('$@*AABC$@*AADCAA$@*A'," | ||
| + " '^(\\$\\@\\*A)*|(\\$\\@\\*A)*$', '')\n" | ||
| + " '^(\\\\$\\\\@\\\\*A)*|(\\\\$\\\\@\\\\*A)*$', '')\n" |
There was a problem hiding this comment.
So this test was wrong?
I hope that this one was validated somehow.
There was a problem hiding this comment.
It seems so. The test was "correct" for the "TRIM BOTH into REGEXP_REPLACE" part, but it was lacking the backslash escape.
|



Jira Link
CALCITE-7667
Changes Proposed
Improve string-literal encoding in several translator: