Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: regexp_extract_all to not return a match in mismatched group (fa…
…cebookincubator#12143) Summary: Fix regexp_extract_all to avoid returning a match in mismatched group. For example, ``` regexp_extract_all("rat cat\nbat dog", "ra(.)|blah(.)(.)", 2) ``` is expected to return {NULL} because the first group `ra(.)` has a match while the second group `blah(.)` has no match. The current buggy implementation returns {""}. This test case and the expected result is from presto's existing UT, see https://github.com/prestodb/presto/blob/48f2fb1cd0244e8ae1230d27445fcd15d6520597/presto-main/src/test/java/com/facebook/presto/operator/scalar/AbstractTestRegexpFunctions.java#L214. Fixes facebookincubator#12119. Pull Request resolved: facebookincubator#12143 Reviewed By: kagamiori Differential Revision: D68746581 Pulled By: xiaoxmeng fbshipit-source-id: 10e6c919fde1c4419a404592b7e7c6941fe983a1
- Loading branch information