You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEAT] Support (?s) regex from SQL LIKE in cudf-polars #24759
Polars SQL turns LIKE '%a%b%' into str.contains("(?s)a.*b"), and libcudf can't compile regexes with the inline (?s) flag
Affects q13
lf=pl.LazyFrame({"comment": ["no special requests", "special\nrequests", "plain"]})
q=lf.sql("SELECT * FROM self WHERE comment NOT LIKE '%special%requests%'")
q.collect() # only "plain"; the "\n" row is matched because of (?s)q.collect(engine=pl.GPUEngine(raise_on_fail=True))
# NotImplementedError: Unsupported regex (?s)special.*requests for GPU engine.
Areas to fix
In dsl/expressions/string.py
StringFunction._create_regex_program (line 329): strip a leading (?s) and pass plc.strings.regex_flags.RegexFlags.DOTALL instead. pylibcudf already exposes DOTALL.
Other inline flags such as (?i) and (?m) could be handled the same way, through IGNORECASE and MULTILINE.
The Contains branch of init (line 196) is where the pattern is passed in.
Activity
Support inline regex flags (?i), (?m), (?s) in libcudf regex enabled …
davidwendt commentedon Oct 26, 2026
Closed by #24784