4 Replies Latest reply on Dec 14, 2016 5:58 AM by Mark Tawk

    Division in MSSQL View materialization

    Mark Tawk Novice

      I'm using Teiid 9.0.0 with MSSQL translator.


      I'm materializing a simple view containing division: select Field1/Field2 as DivField From mytable


      Teiid query resultset metadata is returning the data type float for DivField, so the view table and stage table are created accordingly in MSSQL with a field of type float.


      Materialization is done successfully but when fetching the view i'm getting the error : Expected float, but was double


      I find out in the method addColumn in JDBCMetdataProcessor.java, runtimeType is assigned to "double" instead "float". the variables "type" is set to "8" and "typeName" set to "float".

      In MSSQL JDBC metadata,the type 8 refers to float not to double.

      I have forced the runtimeType value to float for test sake and the view fetched successfully and returned data.


      What do you suggest to do in such a case?