Skip to content
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

regexp_split fails in empty match pattern #12304

Open
HolyLow opened this issue Feb 11, 2025 · 0 comments
Open

regexp_split fails in empty match pattern #12304

HolyLow opened this issue Feb 11, 2025 · 0 comments
Labels
bug Something isn't working triage Newly created issue that needs attention.

Comments

@HolyLow
Copy link
Contributor

HolyLow commented Feb 11, 2025

Bug description

The implementation of Re2RegexpSplit has a bug, that it might fail to split the string when the pattern is a empty string itself.

For example, in the function calling: regexp_split("abcd", "").
The expected result is {"", "a", "b", "c", "d", ""}, but the current implementation would throw error.

This testcase comes from presto https://github.com/prestodb/presto/blob/099bd42eba287b1ea25bf55404c7a18882e0f6d5/presto-main/src/test/java/com/facebook/presto/operator/scalar/AbstractTestRegexpFunctions.java#L231

System information

Velox System Info v0.0.2
Commit: b7ed8c7
CMake Version: 3.28.3
System: Linux-5.15.0-92-generic
Arch: x86_64
C++ Compiler: /usr/bin/c++
C++ Compiler Version: 11.4.0
C Compiler: /usr/bin/cc
C Compiler Version: 11.4.0
CMake Prefix Path: /usr/local;/usr;/;/usr/local/lib/python3.10/dist-packages/cmake/data;/usr/local;/usr/X11R6;/usr/pkg;/opt

Relevant logs

@HolyLow HolyLow added bug Something isn't working triage Newly created issue that needs attention. labels Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Newly created issue that needs attention.
Projects
None yet
Development

No branches or pull requests

1 participant