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

Incorrect documentation on regex string comparator about not supporting flags #239

Open
PragyaTripathi opened this issue Apr 6, 2020 · 5 comments
Labels
api: bigtable Issues related to the googleapis/java-bigtable API. type: docs Improvement to the documentation for an API.

Comments

@PragyaTripathi
Copy link

While comparing HBase and Bigtable and outlining what can be supported, the documentation outlined here: https://cloud.google.com/bigtable/docs/hbase-differences#filters says that BigTable

Supports only the following comparators: RegexStringComparator with no flags and the EQUAL operator

It is possible to set case insensitivity flag using regex function in the library by setting RE2 flag for case insensitive search. (?i)

@product-auto-label product-auto-label bot added the api: bigtable Issues related to the googleapis/java-bigtable API. label Apr 6, 2020
@kolea2 kolea2 added the type: question Request for information or clarification. Not an issue. label Apr 7, 2020
@kolea2
Copy link
Collaborator

kolea2 commented Apr 7, 2020

Hi @PragyaTripathi! Are you using the Bigtable Java client or the Bigtable Hbase Java client? If you are using the Bigtable Java client, you can achieve that using a regex filter. Here's an example for a row key:

Filters.Filter filter = FILTERS.key().regex("(?i)rowkey.*");

You can find more filter examples here: https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/bigtable/snippets/src/main/java/com/example/bigtable/Filters.java

Hope that helps!

@PragyaTripathi
Copy link
Author

Hi @kolea2, I am well aware of it. I was just pointing out that the documentation is incorrect.

@rahulKQL
Copy link
Contributor

rahulKQL commented Apr 8, 2020

Hi @PragyaTripathi,

The flag in difference's documentation refers to RegexStringComparater's constructor param. In case a user sets this param(eg. new RegexStringComparator("a.*", Pattern.CASE_INSENSITIVE)) the Bigtable HBase client ignores the flag.

@kolea2 kolea2 added type: docs Improvement to the documentation for an API. and removed type: question Request for information or clarification. Not an issue. labels Apr 8, 2020
@kolea2
Copy link
Collaborator

kolea2 commented Apr 8, 2020

@PragyaTripathi apologies, I misread your initial post - got it, thank you for filing this!

@cshaff0524 is this something you could take a look at? Edit: looking at Rahul's comment, perhaps we could mention this

@cshaff0524
Copy link
Contributor

Yes, I'll create a docs bug for this. Thanks for the heads up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigtable Issues related to the googleapis/java-bigtable API. type: docs Improvement to the documentation for an API.
Projects
None yet
Development

No branches or pull requests

4 participants