[
https://issues.apache.org/jira/browse/PHOENIX-1487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Brian Gilreath updated PHOENIX-1487:
------------------------------------
Labels: Array (was: )
> Array Constructor Index out of Bounds Exception
> -----------------------------------------------
>
> Key: PHOENIX-1487
> URL: https://issues.apache.org/jira/browse/PHOENIX-1487
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 3.1
> Environment: hbase 0.94.6-cdh4.4.0
> Reporter: Brian Gilreath
> Labels: Array
>
> When selecting on multiple array values such as:
> {{select a[1], a[2], a[3] from my_table;}}
> I get an index out of bounds exception.
> Reproducible case:
> {{0: jdbc:phoenix:> create table my_table ( abc BIGINT primary key, my_array
> BIGINT array[3] );}}
> {{0: jdbc:phoenix:> UPSERT INTO my_table ( abc, my_array ) VALUES ( 1,
> ARRAY[1,2,3] );}}
> {{1 row affected (0.034 seconds)}}
> {{0: jdbc:phoenix:> select abc, my_array[1], my_array[2], my_array[3] from
> my_table;}}
> +------------+-----------------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------+
> | ABC |
> org.apache.phoenix.compile.ProjectionCompiler$ArrayIndexExpression@51927ba1 |
> org.apache.phoenix.compile.ProjectionCompiler$ArrayIndexExpression@67f2b0dd |
> org.apache.phoenix.compile.ProjectionCompiler$ArrayIndexExpressio |
> +------------+-----------------------------------------------------------------------------+-----------------------------------------------------------------------------+-------------------------------------------------------------------+
> java.lang.RuntimeException: org.apache.phoenix.exception.PhoenixIOException:
> org.apache.phoenix.exception.PhoenixIOException:
> org.apache.hadoop.hbase.DoNotRetryIOException:
> MY_TABLE,,1417046307845.733ba2435d5986e1e95bf694f0542f88.: Index: 0, Size: 0
> at
> org.apache.phoenix.util.ServerUtil.throwIOException(ServerUtil.java:73)
> at
> org.apache.phoenix.coprocessor.ScanRegionObserver$2.nextRaw(ScanRegionObserver.java:350)
> at
> org.apache.hadoop.hbase.regionserver.HRegionServer.next(HRegionServer.java:2513)
> at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.apache.hadoop.hbase.ipc.WritableRpcEngine$Server.call(WritableRpcEngine.java:320)
> at
> org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:1428)
> Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
> at java.util.ArrayList.rangeCheck(ArrayList.java:604)
> at java.util.ArrayList.remove(ArrayList.java:445)
> at
> org.apache.phoenix.coprocessor.ScanRegionObserver$2.replaceArrayIndexElement(ScanRegionObserver.java:390)
> at
> org.apache.phoenix.coprocessor.ScanRegionObserver$2.nextRaw(ScanRegionObserver.java:347)
> ... 6 more
> at sqlline.SqlLine$IncrementalRows.hasNext(SqlLine.java:2440)
> at sqlline.SqlLine$TableOutputFormat.print(SqlLine.java:2074)
> at sqlline.SqlLine.print(SqlLine.java:1735)
> at sqlline.SqlLine$Commands.execute(SqlLine.java:3683)
> at sqlline.SqlLine$Commands.sql(SqlLine.java:3584)
> at sqlline.SqlLine.dispatch(SqlLine.java:821)
> at sqlline.SqlLine.begin(SqlLine.java:699)
> at sqlline.SqlLine.mainWithInputRedirection(SqlLine.java:441)
> at sqlline.SqlLine.main(SqlLine.java:424)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)