Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-2824

Parse Boolean type in JDBC driver

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • v2.2.0
    • Driver - JDBC
    • None

    Description

      Exception below is thrown when querying kylin with Saiku as front end, or when retrieving value from getBoolean method in jdbc driver.
      That's because KylinClient in jdbc module dose not parse value properly when dimension is boolean type.

      Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
      at org.apache.kylin.jdbc.shaded.org.apache.calcite.avatica.util.AbstractCursor$BooleanAccessor.getBoolean(AbstractCursor.java:463)
      at org.apache.kylin.jdbc.shaded.org.apache.calcite.avatica.util.AbstractCursor$BooleanAccessor.getLong(AbstractCursor.java:468)
      at org.apache.kylin.jdbc.shaded.org.apache.calcite.avatica.util.AbstractCursor$AccessorImpl.getInt(AbstractCursor.java:304)
      at org.apache.kylin.jdbc.shaded.org.apache.calcite.avatica.AvaticaResultSet.getInt(AvaticaResultSet.java:252)
      at org.apache.commons.dbcp.DelegatingResultSet.getInt(DelegatingResultSet.java:225)
      at org.apache.commons.dbcp.DelegatingResultSet.getInt(DelegatingResultSet.java:225)
      at mondrian.rolap.SqlStatement$4.get(SqlStatement.java:418)
      at mondrian.rolap.SqlStatement$1.get(SqlStatement.java:394)
      at mondrian.rolap.SqlTupleReader$Target.internalAddRow(SqlTupleReader.java:260)
      at mondrian.rolap.SqlTupleReader$Target.addRow(SqlTupleReader.java:172)
      at mondrian.rolap.SqlTupleReader.prepareTuples(SqlTupleReader.java:545)
      at mondrian.rolap.SqlTupleReader.readTuples(SqlTupleReader.java:690)
      at mondrian.rolap.RolapNativeSet$SetEvaluator.executeList(RolapNativeSet.java:260)
      at mondrian.rolap.RolapNativeSet$SetEvaluator.execute(RolapNativeSet.java:200)
      at mondrian.olap.fun.NonEmptyCrossJoinFunDef$1.evaluateList(NonEmptyCrossJoinFunDef.java:80)
      at mondrian.calc.impl.AbstractListCalc.evaluateIterable(AbstractListCalc.java:71)
      at mondrian.olap.fun.CrossJoinFunDef$CrossJoinIterCalc.evaluateIterable(CrossJoinFunDef.java:184)
      at mondrian.rolap.RolapResult.executeAxis(RolapResult.java:857)
      at mondrian.rolap.RolapResult.evalLoad(RolapResult.java:693)
      at mondrian.rolap.RolapResult.loadMembers(RolapResult.java:649)
      at mondrian.rolap.RolapResult.<init>(RolapResult.java:279)
      at mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:500)
      ... 7 more

      Attachments

        1. KYLIN-2824.patch
          1 kB
          Tianhao Zhao

        Activity

          People

            Unassigned Unassigned
            Tianhao Zhao Tianhao Zhao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: