[
https://issues.apache.org/jira/browse/PHOENIX-1363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
James Taylor resolved PHOENIX-1363.
-----------------------------------
Resolution: Cannot Reproduce
> java.lang.ArrayIndexOutOfBoundsException with min/max query on CHAR column
> with '0' prefixed values
> ---------------------------------------------------------------------------------------------------
>
> Key: PHOENIX-1363
> URL: https://issues.apache.org/jira/browse/PHOENIX-1363
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.1
> Environment: HBase 0.98.4
> RHEL 6.5
> Reporter: Hari Krishna Dara
> Labels: aggregate, char
>
> While playing with the queries to reproduce PHOENIX-1362, I got the below
> exception (take the same schema and data as in PHOENIX-1362):
> {noformat}
> 0: jdbc:phoenix:isthbase01-mnds2-1-crd> select min(VAL2), min(VAL3) from TT;
> +------------+------------+
> | MIN(VAL2) | MIN(VAL3) |
> +------------+------------+
> java.lang.ArrayIndexOutOfBoundsException
> at java.lang.System.arraycopy(Native Method)
> at
> org.apache.phoenix.schema.KeyValueSchema.writeVarLengthField(KeyValueSchema.java:150)
> at
> org.apache.phoenix.schema.KeyValueSchema.toBytes(KeyValueSchema.java:116)
> at
> org.apache.phoenix.schema.KeyValueSchema.toBytes(KeyValueSchema.java:91)
> at
> org.apache.phoenix.expression.aggregator.Aggregators.toBytes(Aggregators.java:109)
> at
> org.apache.phoenix.iterate.GroupedAggregatingResultIterator.next(GroupedAggregatingResultIterator.java:83)
> at
> org.apache.phoenix.iterate.UngroupedAggregatingResultIterator.next(UngroupedAggregatingResultIterator.java:39)
> at
> org.apache.phoenix.jdbc.PhoenixResultSet.next(PhoenixResultSet.java:732)
> at sqlline.SqlLine$IncrementalRows.hasNext(SqlLine.java:2429)
> 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)
> 0: jdbc:phoenix:isthbase01-mnds2-1-crd> select min(VAL1), min(VAL2) from TT;
> +------------+------------+
> | MIN(VAL1) | MIN(VAL2) |
> +------------+------------+
> | 0 | null |
> +------------+------------+
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)