phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lu Wei <>
Subject phoenix query server java.lang.ClassCastException for BIGINT ARRAY column
Date Thu, 19 Apr 2018 02:17:07 GMT
Hi there,

I have a phoenix table containing an BIGINT ARRAY column. But when querying query server (through, there is an exception:

java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long

BTW, when query through, everything works fine. And data in HBase table are of
Long type, so why does the Integer to Long cast happen?

## Table schema:

create table if not exists gis_tracking3(tracking_object_id bigint not null, lat double, lon
double, speed double, bearing double, time timestamp not null, events bigint array constraint
pk primary key (tracking_object_id, time))

## when query events[1], it works fine:

0: jdbc:phoenix:thin:url=> select  events[1]+1 from gis_tracking3;
| (ARRAY_ELEM(EVENTS, 1) + 1)  |
| 11                           |
| 2223                         |
| null                         |
| null                         |
| 10001                        |

## when querying events, it throws exception:

0: jdbc:phoenix:thin:url=> select  events from gis_tracking3;
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
  at sqlline.Rows$Row.<init>(
  at sqlline.BufferedRows.<init>(
  at sqlline.SqlLine.print(
  at sqlline.Commands.execute(
  at sqlline.Commands.sql(
  at sqlline.SqlLine.dispatch(
  at sqlline.SqlLine.begin(
  at sqlline.SqlLine.start(
  at sqlline.SqlLine.main(
  at org.apache.phoenix.queryserver.client.SqllineWrapper.main(

I guess there is some issue in query sever, but can't figure out why.

Any suggestions?


View raw message