Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.9.0
-
None
Description
Query with reverse function fails:
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))
for table with several long varchars.
cat /tmp/test.json {"a": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"} {"a": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"} {"a": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"} {"a": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"} {"a": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"}
The same query works for the table with less row number:
0: jdbc:drill:zk=local> select reverse(a) from dfs.`/tmp/test2.json`; +-------------------------------------------------------+ | EXPR$0 | +-------------------------------------------------------+ | zyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcba | | zyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcba | | zyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcba | | zyxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcba | +-------------------------------------------------------+
cat /tmp/test2.json {"a": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"} {"a": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"} {"a": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"} {"a": "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"}
Attachments
Issue Links
- links to