[
https://issues.apache.org/jira/browse/CASSANDRA-15269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16911757#comment-16911757
]
Andy Tolbert commented on CASSANDRA-15269:
------------------------------------------
I made a small comment that this should be part of the protocol v5 spec instead
of v4, but other than that I think this looks good. I went ahead and created a
java driver ticket for awareness:
[JAVA-2397|https://datastax-oss.atlassian.net/browse/JAVA-2397]. The native
protocol change will be great for the 4.0 java driver. We should also consider
making the change in the 3.0 driver since that intends on supporting C* 4.0 as
well.
> Cassandra fails to process OperationExecutionException which causes
> ClassCastException
> --------------------------------------------------------------------------------------
>
> Key: CASSANDRA-15269
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15269
> Project: Cassandra
> Issue Type: Bug
> Components: CQL/Interpreter
> Reporter: Liudmila Kornilova
> Assignee: Liudmila Kornilova
> Priority: Normal
>
> While working on CASSANDRA-15232 I noticed that OperationExecutionException
> is not processed correctly.
> How to reproduce the issue:
> 1. {{create table d (numerator decimal primary key, denominator decimal);}}
> 2. {{insert into d (numerator, denominator) values
> (123456789112345678921234567893123456, 2);}}
> 3. {{select numerator % denominator from d;}}
> What happens:
> 1. remainder operation throws ArithmeticException (BigDecimal:1854)
> 2. The exception is wrapped in OperationExecutionException
> 3. ClassCastException appears (OperationExecutionException cannot be cast to
> FunctionExecutionException at ErrorMessage.java:280)
> What should happen:
> OperationExecutionException with message "the operation 'decimal % decimal'
> failed: Division impossible" should be delivered to user
> Note that after fixing CASSANDRA-15232 {{select numerator % denominator from
> d;}} will produce correct result of remainder operation.
> Currently I am not aware of other cases when OperationExecutionException may
> be treated as FunctionExecutionException
--
This message was sent by Atlassian Jira
(v8.3.2#803003)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]