rich7420 opened a new pull request, #6745: URL: https://github.com/apache/datafusion-comet/pull/6745
## Which issue does this PR close? Part of #6627. This addresses the seven fixtures with incorrectly escaped regex patterns; the Scala-to-SQL coverage migration remains open. ## Rationale for this change Spark removes backslashes from ordinary SQL literals such as '\d' before the regex engine sees them. These fixtures could pass Spark/Comet parity while testing different patterns from the ones described in their comments. For example, the digit extraction returned `d` from `abc123def`, and the capture-group replacement never changed `100-200`. ## What changes are included in this PR? Use raw SQL literals for backslash-containing patterns in seven regex fixtures. Assert the intended native or JVM-dispatched execution path, including literal-only queries where applicable. Keep the final mixed-path RLIKE query as a parity check and explain why. No production code or Scala test migration is included. ## How are these changes tested? Built the native library from base `c8e6553da` and ran the root-reactor `CometSqlFileTestSuite` filters `regexp` and `rlike` on Spark 3.4, 3.5 and 4.1. All 12 fixtures passed on each profile, with zero failures, cancellations or ignored tests. These include all seven changed fixtures. Also passed Spark 3.5 strict-warnings test compilation and `git diff --check`. Spark 4.0 and 4.2 remain for `run-all-spark-profiles` CI. A standalone Spark 3.5.9 probe verified these before/after results with ordinary versus raw SQL literals: | Case | Before | After | |---|---|---| | Extract digits from `abc123def` | `d` | `123` | | Extract repeated character from `aa` | empty string | `aa` | | Swap digit groups in `100-200` | `100-200` | `200-100` | | Find digit position in `abc123def` | `7` | `4` | | Digit-only RLIKE on `12345` | `false` | `true` | | Literal-plus RLIKE on `a+b`, `ab` | `false`, `true` | `true`, `false` | -- 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]
