[ https://issues.apache.org/jira/browse/HIVE-5909?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ashutosh Chauhan updated HIVE-5909: ----------------------------------- Resolution: Fixed Fix Version/s: 0.13.0 Status: Resolved (was: Patch Available) Committed to trunk. Thanks, Navis! > locate and instr throw java.nio.BufferUnderflowException when empty string as > substring > --------------------------------------------------------------------------------------- > > Key: HIVE-5909 > URL: https://issues.apache.org/jira/browse/HIVE-5909 > Project: Hive > Issue Type: Bug > Components: UDF > Affects Versions: 0.12.0 > Reporter: Rafal Wojdyla > Assignee: Navis > Fix For: 0.13.0 > > Attachments: HIVE-5909.1.patch.txt > > > Locate and instr functions, try: > {code} > select * from foo_bar where locate("", "foobar") > {code} > or > {code} > select * from foo_bar where instr("foobar", "") > {code} > Examples (hive cli): > {noformat} > hive (default)> select locate("","dfs") from foobar; > FAILED: BufferUnderflowException null > {noformat} > Log output from the failed job: > {noformat} > Task ID: > task_1384392632998_7426_m_000035 > > URL: > > http://jobtracker:54311/taskdetails.jsp?jobid=job_1384392632998_7426&tipid=task_1384392632998_7426_m_000035 > ----- > Diagnostic Messages for this Task: > Error: java.lang.RuntimeException: > org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while > processing row {...} > at org.apache.hadoop.hive.ql.exec.mr.ExecMapper.map(ExecMapper.java:175) > at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54) > at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:429) > at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341) > at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:162) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:396) > at > org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491) > at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:157) > Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime > Error while processing row {...} > at > org.apache.hadoop.hive.ql.exec.MapOperator.process(MapOperator.java:544) > at org.apache.hadoop.hive.ql.exec.mr.ExecMapper.map(ExecMapper.java:157) > ... 8 more > Caused by: java.nio.BufferUnderflowException > at java.nio.Buffer.nextGetIndex(Buffer.java:474) > at java.nio.HeapByteBuffer.get(HeapByteBuffer.java:117) > {noformat} -- This message was sent by Atlassian JIRA (v6.1#6144)