You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Liudmila Kornilova (JIRA)" <ji...@apache.org> on 2019/08/08 08:24:00 UTC
[jira] [Created] (CASSANDRA-15269) Cassandra fails to process
OperationExecutionException which causes ClassCastException
Liudmila Kornilova created CASSANDRA-15269:
----------------------------------------------
Summary: 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
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
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org