Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-15269

Cassandra fails to process OperationExecutionException which causes ClassCastException

Agile BoardAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 4.0.2
    • CQL/Interpreter
    • None

    Description

      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

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            bereng Berenguer Blasi Assign to me
            Override Liudmila Kornilova
            Berenguer Blasi
            Benjamin Lerer, Sam Tunnicliffe
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 10m
                10m

                Slack

                  Issue deployment