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

Nicolas Liochon commented on PHOENIX-2620:
------------------------------------------

The branch is took at is master yes?
Then if I look at this branch in github:
- the bug is still there
- the patch I uploaded 3 days ago still applies
- a similar issue was fixed a few months ago for JavaPattern#replaceAll 
(PHOENIX-1870) but it did not fix the JavaPattern#matches method...


> NPE in org.apache.phoenix.expression.util.regex.JavaPattern.matches
> -------------------------------------------------------------------
>
>                 Key: PHOENIX-2620
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2620
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.6.0
>            Reporter: Nicolas Liochon
>             Fix For: 4.8.0
>
>         Attachments: phoenix.patch
>
>
> The error shows up w/ likes & dynamic columns for example:
> {code}
> ht.put(new Put("1".getBytes()).addImmutable(CF, "C2".getBytes(), 
> "".getBytes()));
> stmt.executeQuery("SELECT count(1) from PB(F.C2 VARCHAR) where C2 like 
> 'a%'")) {
> {code}
> gives a stack w/
> {code}
> Caused by: java.lang.NullPointerException
>     at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
>     at java.util.regex.Matcher.reset(Matcher.java:309)
>     at java.util.regex.Matcher.<init>(Matcher.java:229)
>     at java.util.regex.Pattern.matcher(Pattern.java:1093)
>     at 
> org.apache.phoenix.expression.util.regex.JavaPattern.matches(JavaPattern.java:51)
>     at 
> org.apache.phoenix.expression.LikeExpression.evaluate(LikeExpression.java:297)
>     at 
> org.apache.phoenix.filter.BooleanExpressionFilter.evaluate(BooleanExpressionFilter.java:93)
>     at 
> org.apache.phoenix.filter.SingleKeyValueComparisonFilter.filterKeyValue(SingleKeyValueComparisonFilter.java:93)
>     at 
> org.apache.hadoop.hbase.regionserver.ScanQueryMatcher.match(ScanQueryMatcher.java:418)
>     at 
> org.apache.hadoop.hbase.regionserver.StoreScanner.next(StoreScanner.java:545)
>     at 
> org.apache.hadoop.hbase.regionserver.KeyValueHeap.next(KeyValueHeap.java:147)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to