Khurram Faraaz created DRILL-6214:
-------------------------------------
Summary: DrillRuntimeException: Unexpected byte 0xfe at position 0
encountered while decoding UTF8 string.
Key: DRILL-6214
URL: https://issues.apache.org/jira/browse/DRILL-6214
Project: Apache Drill
Issue Type: Bug
Components: Functions - Drill
Affects Versions: 1.12.0
Reporter: Khurram Faraaz
binary_string function returns DrillRuntimeException.
Apache Drill 1.13.0-SNAPSHOT, commit id:
9073aed67d89e8b2188870d6c812706085c9c41b
{noformat}
0: jdbc:drill:schema=dfs.tmp> select
binary_string(convert_to('abcdefghi','UTF16')) binStr from (values(1));
Error: SYSTEM ERROR: DrillRuntimeException: Unexpected byte 0xfe at position 0
encountered while decoding UTF8 string.
Fragment 1:0
[Error Id: 6233b0fe-19f2-40ff-9c9e-c4e317ff19d0 on qa102-48.qa.lab:31010]
(state=,code=0)
Caused by: org.apache.drill.common.exceptions.DrillRuntimeException: Unexpected
byte 0xfe at position 0 encountered while decoding UTF8 string.
at
org.apache.drill.exec.expr.fn.impl.StringFunctionUtil.utf8CharLen(StringFunctionUtil.java:88)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at
org.apache.drill.exec.expr.fn.impl.StringFunctionUtil.getUTF8CharLength(StringFunctionUtil.java:32)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at
org.apache.drill.exec.test.generated.ProjectorGen346.doSetup(ProjectorTemplate.java:116)
~[na:na]
at
org.apache.drill.exec.test.generated.ProjectorGen346.setup(ProjectorTemplate.java:101)
~[na:na]
at
org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.setupNewSchemaFromInput(ProjectRecordBatch.java:490)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at
org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.setupNewSchema(ProjectRecordBatch.java:498)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at
org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:82)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at
org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:134)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:164)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at
org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:105)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at
org.apache.drill.exec.physical.impl.SingleSenderCreator$SingleSenderRootExec.innerNext(SingleSenderCreator.java:93)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:95)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at
org.apache.drill.exec.work.fragment.FragmentExecutor$1.run(FragmentExecutor.java:233)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at
org.apache.drill.exec.work.fragment.FragmentExecutor$1.run(FragmentExecutor.java:226)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_131]
at javax.security.auth.Subject.doAs(Subject.java:422) ~[na:1.8.0_131]
at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1595)
~[hadoop-common-2.7.0-mapr-1707.jar:na]
at
org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:226)
[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
... 4 common frames omitted
{noformat}
{noformat}
0: jdbc:drill:schema=dfs.tmp> select
binary_string(convert_to('123456','UTF16')) binStr from (values(1));
Error: SYSTEM ERROR: DrillRuntimeException: Unexpected byte 0xfe at position 0
encountered while decoding UTF8 string.
Fragment 1:0
[Error Id: 8a1bb0f0-7a9a-46da-b5e9-46e184690e2b on qa102-46.qa.lab:31010]
(state=,code=0)
Caused by: org.apache.drill.common.exceptions.DrillRuntimeException: Unexpected
byte 0xfe at position 0 encountered while decoding UTF8 string.
at
org.apache.drill.exec.expr.fn.impl.StringFunctionUtil.utf8CharLen(StringFunctionUtil.java:88)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at
org.apache.drill.exec.expr.fn.impl.StringFunctionUtil.getUTF8CharLength(StringFunctionUtil.java:32)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at
org.apache.drill.exec.test.generated.ProjectorGen272.doSetup(ProjectorTemplate.java:116)
~[na:na]
at
org.apache.drill.exec.test.generated.ProjectorGen272.setup(ProjectorTemplate.java:101)
~[na:na]
at
org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.setupNewSchemaFromInput(ProjectRecordBatch.java:490)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at
org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.setupNewSchema(ProjectRecordBatch.java:498)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at
org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:82)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at
org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:134)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at
org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:164)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at
org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:105)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at
org.apache.drill.exec.physical.impl.SingleSenderCreator$SingleSenderRootExec.innerNext(SingleSenderCreator.java:93)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:95)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at
org.apache.drill.exec.work.fragment.FragmentExecutor$1.run(FragmentExecutor.java:233)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at
org.apache.drill.exec.work.fragment.FragmentExecutor$1.run(FragmentExecutor.java:226)
~[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_131]
at javax.security.auth.Subject.doAs(Subject.java:422) ~[na:1.8.0_131]
at
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1595)
~[hadoop-common-2.7.0-mapr-1707.jar:na]
at
org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:226)
[drill-java-exec-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
... 4 common frames omitted
{noformat}
Both queries return binary strings as output of CONVERT_TO function, problem is
seen only when that output is input to binary_string function.
{noformat}
0: jdbc:drill:schema=dfs.tmp> select convert_to('123456','UTF16') binStr from
(values(1));
+--------------+
| binStr |
+--------------+
| [B@4a335fa8 |
+--------------+
1 row selected (0.143 seconds)
0: jdbc:drill:schema=dfs.tmp> select convert_to('abcdefghi','UTF16') binStr
from (values(1));
+-------------+
| binStr |
+-------------+
| [B@3829ac1 |
+-------------+
1 row selected (0.172 seconds)
{noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)