You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "Sean-Kenneth-Doherty (via GitHub)" <gi...@apache.org> on 2026/05/17 03:54:35 UTC
[PR] test: cover regexp_replace multiline flag [datafusion]
Sean-Kenneth-Doherty opened a new pull request, #22287:
URL: https://github.com/apache/datafusion/pull/22287
## Which issue does this PR close?
- Closes #22258.
## Rationale for this change
PostgreSQL-compatible `regexp_replace` should honor the multiline flag `m` so anchors like `^` can match after newlines. The issue report covers `regexp_replace(E'a\nb', '^b', 'x', 'm')`, which should produce `a\nx`.
Current main already returns the PostgreSQL-compatible result, so this PR adds explicit regression coverage to keep that behavior from drifting.
## What changes are included in this PR?
- Adds Rust unit coverage for scalar/static `regexp_replace` with flag `m`.
- Adds sqllogictest coverage for `m` and `gm` multiline flag behavior.
## Are these changes tested?
- `cargo fmt --all`
- `TMPDIR=/home/sean/Projects/datafusion-regexp-replace/target/tmp cargo test -p datafusion-functions regex::regexpreplace::tests::test_static_pattern_regexp_replace_multiline_flag -- --nocapture`
- `TMPDIR=/home/sean/Projects/datafusion-regexp-replace/target/tmp cargo test --profile=ci --test sqllogictests -- regexp/regexp_replace.slt`
- `TMPDIR=/home/sean/Projects/datafusion-regexp-replace/target/tmp cargo clippy --all-targets --all-features -- -D warnings`
- `git diff --check`
## Are there any user-facing changes?
No behavior change intended. This adds regression coverage for PostgreSQL-compatible multiline `regexp_replace` behavior.
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] test: cover regexp_replace multiline flag [datafusion]
Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on PR #22287:
URL: https://github.com/apache/datafusion/pull/22287#issuecomment-4541706494
I'm a bit confused, was the original issue a false report?
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] test: cover regexp_replace multiline flag [datafusion]
Posted by "Sean-Kenneth-Doherty (via GitHub)" <gi...@apache.org>.
Sean-Kenneth-Doherty commented on PR #22287:
URL: https://github.com/apache/datafusion/pull/22287#issuecomment-4469412633
Fresh validation on the PR head (`b50d56520`):
- `TMPDIR=/home/sean/Projects/datafusion-regexp-replace/target/tmp cargo test -p datafusion-functions regex::regexpreplace::tests::test_static_pattern_regexp_replace_multiline_flag -- --nocapture` -> passed (`1 passed`)
- `TMPDIR=/home/sean/Projects/datafusion-regexp-replace/target/tmp cargo test --profile=ci --test sqllogictests -- regexp/regexp_replace.slt` -> passed (`1/1 files completed`)
- `cargo fmt --all -- --check` -> passed
- `git diff --check origin/main...HEAD` -> clean
GitHub Actions only ran the labeler for this PR, so this leaves current regression evidence visible for review.
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] test: cover regexp_replace multiline flag [datafusion]
Posted by "Jefffrey (via GitHub)" <gi...@apache.org>.
Jefffrey commented on PR #22287:
URL: https://github.com/apache/datafusion/pull/22287#issuecomment-4560120813
Let's just add the SLT case then, assuming we don't have existing coverage for this multiline case
related:
- https://github.com/apache/datafusion/pull/22284
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org
Re: [PR] test: cover regexp_replace multiline flag [datafusion]
Posted by "Sean-Kenneth-Doherty (via GitHub)" <gi...@apache.org>.
Sean-Kenneth-Doherty commented on PR #22287:
URL: https://github.com/apache/datafusion/pull/22287#issuecomment-4558868779
Yes, I think the original report was stale/false against current `main` by the time I checked it. The reported PostgreSQL-compatible case already returns `a\nx` locally, so this PR is just locking that behavior in with explicit Rust and SQL regression coverage rather than changing runtime behavior.
Given that, I’m also fine closing this if you’d prefer not to add coverage for a behavior that already works.
--
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: github-unsubscribe@datafusion.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org