When using RegexStringComparator, HBase will try to match a substring of the target. While bigtable requires a full match. For example, given the target "abcd", in HBase the regex "[bc]*" will match the string. However Bigtable will not. Bigtable will require the regex to also match a & d.
This PR addresses this discrepancy by surrounding the user provided regex with a zero or more wildcards. ie transform "[bc]*" into ".*[bc]*.*"
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
[ ] Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
[ ] Ensure the tests and linter pass
[ ] Code coverage does not decrease (if any source code was changed)
[ ] Appropriate docs were updated (if necessary)
Fixes # ☕️
If you write sample code, please follow the samples format.
When using RegexStringComparator, HBase will try to match a substring of the target. While bigtable requires a full match. For example, given the target
"abcd"
, in HBase the regex"[bc]*"
will match the string. However Bigtable will not. Bigtable will require the regex to also matcha
&d
.This PR addresses this discrepancy by surrounding the user provided regex with a zero or more wildcards. ie transform
"[bc]*"
into".*[bc]*.*"
Change-Id: I7404bddd4c9c9d907d57225d99f7062c4407fc35
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes # ☕️
If you write sample code, please follow the samples format.