[ 
https://issues.apache.org/jira/browse/HBASE-5667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13240818#comment-13240818
 ] 

David Arthur commented on HBASE-5667:
-------------------------------------

@Zhihong, yes it would be incompatible if it tried to read Filters that were 
serialized with the current code. I'm assuming that these Filters are ephemeral 
and aren't stored anywhere (could be a very wrong assumption). 

Otherwise, the purpose of this patch is to expose the ability to add regex 
flags to the comparator. E.g., if I want a case-insensitive match I could 
construct a Filter like:

{code}
new SingleColumnValueFilter(COLUMN_FAMILY, COLUMN_QUALIFIER, CompareOp.EQUAL,
  new RegexStringComparator(Pattern.compile("foo", Pattern.CASE_INSENSITIVE | 
Pattern.DOTALL)));
{code}

Also, in the current code, DOTALL is added to the underlying Pattern, but 
doesn't appear to be applied when deserializing. 
                
> RegexStringComparator supports java.util.regex.Pattern flags
> ------------------------------------------------------------
>
>                 Key: HBASE-5667
>                 URL: https://issues.apache.org/jira/browse/HBASE-5667
>             Project: HBase
>          Issue Type: Improvement
>          Components: filters
>            Reporter: David Arthur
>            Priority: Minor
>         Attachments: HBASE-5667.diff
>
>
> * Add constructor that takes in a Pattern
> * Add Pattern's flags to Writable fields, and actually use them when 
> recomposing the Filter

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to