9 Replies Latest reply on Mar 13, 2013 2:06 PM by Steven Hawkins

    8.3 beta insert with doulbe[] as parameters causing teiid to throw exception.

    kchen007 Apprentice

      The same code works with Teiid 8.1 final, but after upgrade to 8.3 beta 3, the following exception is thrown when converting parameter value for double[]


      14:42:24,726 WARN  [org.teiid.PROCESSOR] (http-- TEIID30020 Processing exception 'TEIID30558 Error converting parameter number 3 with value "[D@5270e941" to expected type object.' for request ecxUJZNoiEH/.0.  Exception type org.teiid.api.exception.query.QueryResolverException thrown from org.teiid.dqp.internal.process.PreparedStatementRequest.resolveParameterValues(PreparedStatementRequest.java:256). Enable more detailed logging to see the entire stacktrace.



      The sql is like:


      Call: INSERT INTO ClipPolygon (ClipPolygon.grid_id,ClipPolygon.npts,ClipPolygon.u,ClipPolygon.v,ClipPolygon.vertex_attribute,ClipPolygon.w,SOURCE_NAME) VALUES (


              bind => [23, 2, [D@5270e941, [D@4e699ca9, [Ljava.lang.String;@77ac4376, [Ljava.lang.Float;@4e81355b]

      Query: DataModifyQuery(sql="INSERT INTO ClipPolygon (ClipPolygon.grid_id,ClipPolygon.npts,ClipPolygon.u,ClipPolygon.v,ClipPolygon.vertex_attribute,ClipPolygon.w

      ,SOURCE_NAME) VALUES (?,?,?,?,?,?,'UTM14_USOF')")


      When I debug into the code, 

           for double[] parameter, in resolveParameterValues() function, the targetTypeName is object


      then the Constant object constructed, its type is Object[] instead of double[]


      the exception is thrown from ResolverUtil.convertExpression(), the value for the parameters are:


      sourceExpression Constant  (id=14573)

            bindEligible false

            multiValued false

            type Class<T> (java.lang.Object[]) (id=9587)

            value (id=14518)

                  [0] 0.85395

                  [1] 0.91274

      sourceTypeName "object[]" (id=14476)

      targetTypeName "object" (id=14036)

      metadata TempMetadataAdapter  (id=14550)