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

Regex fails with ArrayIndexOutOfBoundsException #3735

Closed
electrum opened this issue Oct 8, 2015 · 1 comment
Closed

Regex fails with ArrayIndexOutOfBoundsException #3735

electrum opened this issue Oct 8, 2015 · 1 comment
Labels

Comments

@electrum
Copy link
Contributor

electrum commented Oct 8, 2015

presto> select REGEXP_LIKE('a' ,'a.*\b');
Query ... failed: 1
java.lang.ArrayIndexOutOfBoundsException: 1
    at io.airlift.jcodings.MultiByteEncoding.safeLengthForUptoFour(MultiByteEncoding.java:64)
    at io.airlift.jcodings.specific.NonStrictUTF8Encoding.length(NonStrictUTF8Encoding.java:30)
    at io.airlift.jcodings.specific.BaseUTF8Encoding.mbcToCode(BaseUTF8Encoding.java:91)
    at io.airlift.jcodings.specific.NonStrictUTF8Encoding.mbcToCode(NonStrictUTF8Encoding.java:22)
    at io.airlift.jcodings.Encoding.isMbcWord(Encoding.java:469)
    at io.airlift.joni.ByteCodeMachine.opWordBound(ByteCodeMachine.java:1063)
    at io.airlift.joni.ByteCodeMachine.matchAt(ByteCodeMachine.java:239)
    at io.airlift.joni.Matcher.matchCheck(Matcher.java:304)
    at io.airlift.joni.Matcher.searchInterruptible(Matcher.java:457)
    at io.airlift.joni.Matcher.search(Matcher.java:318)
    at com.facebook.presto.operator.scalar.RegexpFunctions.regexpLike(RegexpFunctions.java:73)
    at com_facebook_presto_$gen_PageProcessor_4069.project_0(Unknown Source)
    at com_facebook_presto_$gen_PageProcessor_4069.process(Unknown Source)
    at com.facebook.presto.operator.FilterAndProjectOperator.getOutput(FilterAndProjectOperator.java:91)
    at com.facebook.presto.operator.Driver.processInternal(Driver.java:380)
    at com.facebook.presto.operator.Driver.processFor(Driver.java:303)
    at com.facebook.presto.execution.SqlTaskExecution$DriverSplitRunner.processFor(SqlTaskExecution.java:587)
    at com.facebook.presto.execution.TaskExecutor$PrioritizedSplitRunner.process(TaskExecutor.java:505)
    at com.facebook.presto.execution.TaskExecutor$Runner.run(TaskExecutor.java:640)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
@electrum electrum added the bug label Oct 8, 2015
@rschlussel
Copy link
Contributor

duplicate of #8711

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants