drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Volodymyr Vysotskyi (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-5424) Fix IOBE for reverse function
Date Mon, 10 Apr 2017 10:05:41 GMT
Volodymyr Vysotskyi created DRILL-5424:
------------------------------------------

             Summary: Fix IOBE for reverse function
                 Key: DRILL-5424
                 URL: https://issues.apache.org/jira/browse/DRILL-5424
             Project: Apache Drill
          Issue Type: Bug
          Components: Functions - Drill
    Affects Versions: 1.9.0
            Reporter: Volodymyr Vysotskyi
            Assignee: Volodymyr Vysotskyi
            Priority: Minor


Query with reverse function fails:
{code:sql}
0: jdbc:drill:zk=local> select reverse(a) from dfs.`/tmp/test.json`;
Error: SYSTEM ERROR: IndexOutOfBoundsException: index: 259, length: 1 (expected: range(0,
256))
{code}
for table with several long varchars.
{noformat}
cat /tmp/test.json
{"a": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"}
{"a": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"}
{"a": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"}
{"a": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"}
{"a": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"}
{noformat}
The same query works for the table with less row number:
{code:sql}
0: jdbc:drill:zk=local> select reverse(a) from dfs.`/tmp/test2.json`;
+-------------------------------------------------------+
|                        EXPR$0                         |
+-------------------------------------------------------+
| zyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcba  |
| zyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcba  |
| zyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcba  |
| zyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcba  |
+-------------------------------------------------------+
{code}
{noformat}
cat /tmp/test2.json
{"a": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"}
{"a": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"}
{"a": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"}
{"a": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"}
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message