asubiotto opened a new issue, #21923:
URL: https://github.com/apache/datafusion/issues/21923

   ### Describe the bug
   
   Regex (`~`, `~*`) and `LIKE` operators fail to plan when the column is a 
`RunEndEncoded` array whose values are Dictionary-encoded:
   
   ```
   Error during planning: Cannot infer common argument type for regex operation
   RunEndEncoded("run_ends": non-null Int32, "values": Dictionary(UInt32, 
Utf8)) ~ Utf8
   ```
   
   A plain `RunEndEncoded("...", Utf8)` column works; the failure is specific 
to REE wrapping a non-string type that itself needs further coercion (e.g. 
Dictionary).
   
   ### To Reproduce
   
   ```sql
   CREATE TABLE t AS
   SELECT arrow_cast(
       arrow_cast(c, 'Dictionary(UInt32, Utf8)'),
       'RunEndEncoded("run_ends": non-null Int32, "values": Dictionary(UInt32, 
Utf8))'
   ) AS col
   FROM (VALUES ('foo'), ('bar')) AS s(c);
   
   SELECT col ~ 'foo'    FROM t;
   SELECT col LIKE 'foo' FROM t;
   ```
   
   ### Expected behavior
   
   Both queries plan and execute, returning:
   
   ```
   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]

Reply via email to