You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "prakul agarwal (JIRA)" <ji...@apache.org> on 2016/09/07 21:30:20 UTC

[jira] [Comment Edited] (PHOENIX-3210) Exception trying to cast Double to BigDecimal in UpsertCompiler

    [ https://issues.apache.org/jira/browse/PHOENIX-3210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15471864#comment-15471864 ] 

prakul agarwal edited comment on PHOENIX-3210 at 9/7/16 9:29 PM:
-----------------------------------------------------------------

[~samarthjain] I have moved some tests from DateTimeIT to DateTime2IT. 
 DateTime2IT has tests which are creating there own  tables for testing purpose, whereas DateTimeIT relies on @Before to create the tables. So we are creating unnecessary tables presently. 
I thought we can bifurcate them.What do you think ?


was (Author: prakul):
[~samarthjain] I have moved some tests from DateTimeIT to DateTime2IT. 
 DateTime2IT has tests which are creating there own  tables for testing purpose, whereas DateTimeIT relies on @Before to create the tables. So we are creating unnecessary tables presently.

> Exception trying to cast Double to BigDecimal in UpsertCompiler
> ---------------------------------------------------------------
>
>                 Key: PHOENIX-3210
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3210
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.7.0
>            Reporter: Shehzaad Nakhoda
>            Assignee: prakul agarwal
>              Labels: SFDC
>             Fix For: 4.9.0, 4.8.1
>
>         Attachments: PHOENIX-3210.patch, PHOENIX-3210_v2.patch
>
>
> We have an UPSERT statement that is resulting in this stack trace. Unfortunately I can't get a hold of the actual Upsert statement since we don't log it. 
> Cause0: java.lang.ClassCastException: java.lang.Double cannot be cast to java.math.BigDecimal
>  Cause0-StackTrace: 
>   at org.apache.phoenix.schema.types.PDecimal.isSizeCompatible(PDecimal.java:312)
>   at org.apache.phoenix.compile.UpsertCompiler$3.execute(UpsertCompiler.java:887)
>   at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:335)
>   at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:323)
>   at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>   at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:321)
>   at org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1274)
>   at phoenix.connection.ProtectedPhoenixStatement.executeUpdate(ProtectedPhoenixStatement.java:127)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)