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

'Infinity' float values fails with java.lang.ClassCastException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Blocker
    • Resolution: Unresolved
    • 1.17.0
    • None
    • jdbc-driver
    • None

    Description

      We're using avatica JDBC driver for obtaining data from Apache Druid.

      We have a float column that has an 'Infinity' value.

      {"Right":"Infinity"} {"Right":0} {"Right":0.02}

      It fails with the following exception:

      Caused by: java.lang.ClassCastException: class java.lang.String cannot be cast to class java.lang.Number (java.lang.String and java.lang.Number are in module java.base of loader 'bootstrap')
      Caused by: java.lang.ClassCastException: class java.lang.String cannot be cast to class java.lang.Number (java.lang.String and java.lang.Number are in module java.base of loader 'bootstrap') at org.apache.calcite.avatica.util.AbstractCursor$NumberAccessor.getNumber(AbstractCursor.java:722) ~[avatica-1.17.0.jar:1.17.0] at org.apache.calcite.avatica.util.AbstractCursor$BigNumberAccessor.getFloat(AbstractCursor.java:653) ~[avatica-1.17.0.jar:1.17.0] at org.apache.calcite.avatica.AvaticaResultSet.getFloat(AvaticaResultSet.java:263) ~[avatica-1.17.0.jar:1.17.0]

       
       
       
       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              anton_antonenko Anton Antonenko
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: