apache / apache/datafusion

Do we need to escape search string as it's used in regexp? Wondering what's the result of `contains("abcdefg", ".*")`

Open
#10,929 6 comments 2 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

Do we need to escape search string as it's used in regexp? Wondering what's the result of `contains("abcdefg", ".*")`

_Originally posted by @waynexia in https://github.com/apache/datafusion/pull/10879#discussion_r1635767599_

Contributor guide

Open the contributing guide

Research direction

Start at the `contains` expression entry point and trace how its search string is used with a regular expression. Reproduce `contains("abcdefg", ".*")` and compare the observed behavior with the intended literal-search semantics; done means the escaping behavior is explicitly resolved and covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.