-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix: support Dictionary arrays in regex_match_dyn (#23709) #23722
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -199,3 +199,23 @@ query B | |
| select null !~* 'abc'; | ||
| ---- | ||
| NULL | ||
|
|
||
|
|
||
| # Test for Issue 23709: regex_match_dyn with Dictionary encoded value side | ||
| statement ok | ||
| CREATE TABLE dict_regex_t AS SELECT * FROM (VALUES ('user auth failed')) v(s); | ||
|
|
||
| statement ok | ||
| CREATE TABLE dict_regex_p AS SELECT * FROM (VALUES ('(auth|login)')) v(pat); | ||
|
|
||
| query B | ||
| SELECT arrow_cast(dict_regex_t.s, 'Dictionary(Int32, Utf8)') SIMILAR TO dict_regex_p.pat FROM dict_regex_t CROSS JOIN dict_regex_p; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Heads-up: after a rebase onto current main, this test passes without exercising the new kernel arm — #23704's analyzer coercion now inserts |
||
| ---- | ||
| true | ||
|
|
||
| statement ok | ||
| DROP TABLE dict_regex_t; | ||
|
|
||
| statement ok | ||
| DROP TABLE dict_regex_p; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One case worth knowing about: on this branch's base, a dictionary whose value width differs from the pattern — e.g.
arrow_cast(s, 'Dictionary(Int32, Utf8View)') SIMILAR TO pat— unpacks fine here, but this recursive call then hits.expect("failed to downcast array")inregexp_is_match_flag!and panics (before this PR, the same query returned a clean "not supported" internal error, so on this base the PR turns an error into a panic for that combo). It's the same pre-existing panic class as #22886 for plain arrays, and #23704 on current main already replaced those.expect()s withexec_err!— so rebasing onto main turns this into a clean execution error. I verified that on a cherry-pick of this commit; more context in my summary comment.