Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-16181

Calcite engine. Handle arithmetic overflows

    XMLWordPrintableJSON

Details

    • SQL Calcite: Added arithmetic overflow handling

    Description

      Currently, we silently ignore arithmetic overflows and return the wrong result, for example:

      SELECT 2147483647 + 2147483647

      Returns -2. But SQL standard says that exception should be thrown:

      5) If the most specific type of the result of an arithmetic operation is exact numeric, then Case:
      a) If the operator is not division and the mathematical result of the operation is not exactly representable with the precision and scale of the result data type, then an exception condition is raised: data exception — numeric value out of range.

      Attachments

        Issue Links

          Activity

            People

              alex_pl Aleksey Plekhanov
              alex_pl Aleksey Plekhanov
              Votes:
              0 Vote for this issue
              Watchers:
              4 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 - 1h
                  1h