alamb commented on issue #27120: URL: https://github.com/apache/datafusion/issues/27120#issuecomment-6695989717
I did some digging. Here is the PR that introduced it: - https://github.com/apache/datafusion/pull/20581 The bad news is that it still happens. The "good" news is that it is not a new regression (it appears to have been introduced in 54). That doesn't mean it shouldn't be fixed but I also don't think we need to treat it as a 56 release blocker. | Version | `s = 'a\b'` | `s = 'ab'` | Status | |---|---|---|---| | 53.0.0 | true | false | correct | | 53.1.0 | true | false | correct | | 54.0.0 | false | true | wrong | | 54.1.0 | false | true | wrong | | 55.0.0 | false | true | wrong | | 55.1.0 | false | true | wrong | | main | false | true | wrong | ```sql SELECT s, s ~ ('a' || chr(92) || chr(92) || 'b') AS matches_regex FROM (VALUES (arrow_cast('a\b', 'Utf8View')), (arrow_cast('ab', 'Utf8View'))) AS t(s) ORDER BY s; ``` Correct output (53.1.0): ```sql +-----+---------------+ | s | matches_regex | +-----+---------------+ | a\b | true | | ab | false | +-----+---------------+ ``` Wrong output (54.0.0 and later, including main): ```sql +-----+---------------+ | s | matches_regex | +-----+---------------+ | a\b | false | | ab | true | +-----+---------------+ ``` <details> ```shell andrewlamb@Andrews-MacBook-Pro-3:~$ ~/Software/datafusion-cli/datafusion-cli-53.1.0 DataFusion CLI v53.1.0 > SELECT s, s ~ ('a' || chr(92) || chr(92) || 'b') AS matches_regex FROM (VALUES (arrow_cast('a\b', 'Utf8View')), (arrow_cast('ab', 'Utf8View'))) AS t(s) ORDER BY s; +-----+---------------+ | s | matches_regex | +-----+---------------+ | a\b | true | | ab | false | +-----+---------------+ 2 row(s) fetched. Elapsed 0.002 seconds. > \q andrewlamb@Andrews-MacBook-Pro-3:~$ ~/Software/datafusion-cli/datafusion-cli-54.0.0 DataFusion CLI v54.0.0 > SELECT s, s ~ ('a' || chr(92) || chr(92) || 'b') AS matches_regex FROM (VALUES (arrow_cast('a\b', 'Utf8View')), (arrow_cast('ab', 'Utf8View'))) AS t(s) ORDER BY s; +-----+---------------+ | s | matches_regex | +-----+---------------+ | a\b | false | | ab | true | +-----+---------------+ 2 row(s) fetched. Elapsed 0.002 seconds. ``` </details> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
