Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-3522

SqlValidator.validateLiteral rejects literals with a DECIMAL type that require more than 64 bits

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.18.0, 1.36.0
    • 1.38.0
    • core

    Description

      https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L2983

      for example:

      create table tbl(f1 double),

      f1 stores a double's max value. (1.7976931348623157E308)

      long max value isĀ 9223372036854775807.

      select * from table where f1=value, if value is greater than long max, sqlvalidator will throw out of range exception.

      Attachments

        1. code.png
          30 kB
          Changbo Shu

        Issue Links

          Activity

            People

              mbudiu Mihai Budiu
              sucab Changbo Shu
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: