Description
0: jdbc:phoenix:localhost> CREATE TABLE LONG_BUG ("NAME" VARCHAR PRIMARY KEY, "AMOUNT" DECIMAL);
No rows affected (0.247 seconds)
0: jdbc:phoenix:localhost> UPSERT INTO LONG_BUG ("NAME", "AMOUNT") VALUES('HELLO1', -50000);
java.lang.ClassCastException: java.lang.Long cannot be cast to java.math.BigDecimal
at org.apache.phoenix.schema.types.PDecimal.isSizeCompatible(PDecimal.java:312)
at org.apache.phoenix.compile.UpsertCompiler$3.execute(UpsertCompiler.java:778)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:300)
at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:292)
at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:290)
at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1191)
at sqlline.Commands.execute(Commands.java:822)
at sqlline.Commands.sql(Commands.java:732)
at sqlline.SqlLine.dispatch(SqlLine.java:808)
at sqlline.SqlLine.begin(SqlLine.java:681)
at sqlline.SqlLine.start(SqlLine.java:398)
at sqlline.SqlLine.main(SqlLine.java:292)
Attachments
Attachments
Issue Links
- relates to
-
PHOENIX-3210 Exception trying to cast Double to BigDecimal in UpsertCompiler
- Closed