u70b3 commented on issue #23709:
URL: https://github.com/apache/datafusion/issues/23709#issuecomment-5029813055

   Status update from reviewing #23722: **this repro is already fixed at the 
SQL level on current main** — as a side effect of #23704, which added 
`regex_coercion` for `Expr::SimilarTo` in the analyzer. The dictionary value 
side now gets a decode cast before planning reaches the regex kernel:
   
   ```
   EXPLAIN SELECT arrow_cast(t.s, 'Dictionary(Int32, Utf8)') SIMILAR TO p.pat 
FROM t CROSS JOIN p;
   -- ProjectionExec: expr=[CAST(CAST(s@0 AS Dictionary(Int32, Utf8)) AS Utf8) 
~ pat@1 ...]
   ```
   
   I verified the original repro above returns `true` on main (c111f0a9f) 
without any further patch. The same holds for `~`/`~*`/`!~*` and the regexp 
UDFs, which were already coerced via casts.
   
   What remains is kernel-level robustness: physical plans that bypass the 
analyzer (hand-built `BinaryExpr`, FFI/Substrait consumers) can still deliver a 
`Dictionary` array to `regex_match_dyn` and hit the `internal_err!` reported 
here. That is the scope #23722 now covers — details in my review there. So this 
issue can be closed either way: as fixed by #23704, or once #23722 lands with 
the arm covered by a direct unit test.
   


-- 
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]

Reply via email to