Uploaded image for project: 'Teiid Designer'
  1. Teiid Designer
  2. TEIIDDES-2438

Deploy error "expected integer, but was biginteger" when VDB table has definition consisting of union of two tables, one with int field, one with integer field

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 9.0.1
    • Transformations
    • None
    • Hide

      Abbreviated source tables:

      CREATE TABLE "dbo"."AB_Abstract"
      (
      AgeNumber int,
      )
      ==> Source model SRC_INT_TABLE

      CREATE TABLE ABSTRACT
      (
      AGE integer
      )
      ==> Source model SRC_INTEGER_TABLE

      View definition INT_UNION_INTEGER:

      SELECT
      T1.AgeNumber AS age
      FROM
      SRC_INT_TABLE.AB_Abstract AS T1
      UNION
      SELECT
      T2.AGE AS age
      FROM
      SRC_INTEGER_TABLE.ABSTRACT AS T2

      Deploy VDB

      20:35:53,693 INFO [org.jboss.as.server] (management-handler-thread - 41) JBAS018559: Deployed "INT_UNION_INTEGER.vdb" (runtime-name : "INT_UNION_INTEGER.vdb")
      20:35:53,749 WARN [org.teiid.PLANNER.RESOLVER] (teiid-async-threads - 4) TEIID31080 VW_INT_UNION_INTEGER.INT_UNION_INTEGER validation error: The definition for VW_INT_UNION_INTEGER.INT_UNION_INTEGER has the wrong type for column 1. Expected integer, but was biginteger.

      Apply CAST to second table to ensure fields of same type across union (suggested by Steven Hawkins in forum discussion https://developer.jboss.org/thread/252486)

      SELECT
      T1.AgeNumber AS age
      FROM
      SRC_INT_TABLE.AB_Abstract AS T1
      UNION
      SELECT
      CAST(T2.AGE AS integer) AS age
      FROM
      SRC_INTEGER_TABLE.ABSTRACT AS T2

      And now redeploy successfully

      20:51:11,360 INFO [org.jboss.as.server] (management-handler-thread - 48) JBAS018565: Replaced deployment "INT_UNION_INTEGER.vdb" with deployment "INT_UNION_INTEGER.vdb"
      20:51:11,377 INFO [org.jboss.as.repository] (management-handler-thread - 48) JBAS014901: Content removed from location /opt/jboss-eap-6.3/standalone/data/content/0a/4b1bed8ff3ec9554312098e68a118251f90b9c/content
      20:51:11,397 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (teiid-async-threads - 1) TEIID40003 VDB INT_UNION_INTEGER.1 is set to ACTIVE

      Show
      Abbreviated source tables: CREATE TABLE "dbo"."AB_Abstract" ( AgeNumber int, ) ==> Source model SRC_INT_TABLE CREATE TABLE ABSTRACT ( AGE integer ) ==> Source model SRC_INTEGER_TABLE View definition INT_UNION_INTEGER: SELECT T1.AgeNumber AS age FROM SRC_INT_TABLE.AB_Abstract AS T1 UNION SELECT T2.AGE AS age FROM SRC_INTEGER_TABLE.ABSTRACT AS T2 Deploy VDB 20:35:53,693 INFO [org.jboss.as.server] (management-handler-thread - 41) JBAS018559: Deployed "INT_UNION_INTEGER.vdb" (runtime-name : "INT_UNION_INTEGER.vdb") 20:35:53,749 WARN [org.teiid.PLANNER.RESOLVER] (teiid-async-threads - 4) TEIID31080 VW_INT_UNION_INTEGER.INT_UNION_INTEGER validation error: The definition for VW_INT_UNION_INTEGER.INT_UNION_INTEGER has the wrong type for column 1. Expected integer, but was biginteger. Apply CAST to second table to ensure fields of same type across union (suggested by Steven Hawkins in forum discussion https://developer.jboss.org/thread/252486 ) SELECT T1.AgeNumber AS age FROM SRC_INT_TABLE.AB_Abstract AS T1 UNION SELECT CAST(T2.AGE AS integer) AS age FROM SRC_INTEGER_TABLE.ABSTRACT AS T2 And now redeploy successfully 20:51:11,360 INFO [org.jboss.as.server] (management-handler-thread - 48) JBAS018565: Replaced deployment "INT_UNION_INTEGER.vdb" with deployment "INT_UNION_INTEGER.vdb" 20:51:11,377 INFO [org.jboss.as.repository] (management-handler-thread - 48) JBAS014901: Content removed from location /opt/jboss-eap-6.3/standalone/data/content/0a/4b1bed8ff3ec9554312098e68a118251f90b9c/content 20:51:11,397 INFO [org.teiid.RUNTIME.VDBLifeCycleListener] (teiid-async-threads - 1) TEIID40003 VDB INT_UNION_INTEGER.1 is set to ACTIVE

      Receiving a deploy error "expected integer, but was biginteger" when VDB table has definition consisting of union of two tables, one with int field, other with integer

            Unassigned Unassigned
            lmann99 Leslie Mann (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: