[teiid-issues] [JBoss JIRA] (TEIID-4732) Teiid Server does not honor columns name in external materialization

RH Bugzilla Integration (JIRA) issues at jboss.org
Wed May 17 13:27:00 EDT 2017


     [ https://issues.jboss.org/browse/TEIID-4732?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

RH Bugzilla Integration updated TEIID-4732:
-------------------------------------------
    Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1418074, https://bugzilla.redhat.com/show_bug.cgi?id=1451823, https://bugzilla.redhat.com/show_bug.cgi?id=1418077  (was: https://bugzilla.redhat.com/show_bug.cgi?id=1451823)
        Bugzilla Update: Perform


> Teiid Server does not honor columns name in external materialization
> --------------------------------------------------------------------
>
>                 Key: TEIID-4732
>                 URL: https://issues.jboss.org/browse/TEIID-4732
>             Project: Teiid
>          Issue Type: Bug
>          Components: Common
>    Affects Versions: 9.1.2
>         Environment: * WildFly 10
> * Teiid Server 9.1.2
> * CentOs 7
> * MySQL 5.6.35
>            Reporter: Pedro Inácio
>            Assignee: Steven Hawkins
>             Fix For: 9.0.6, 9.1.3, 8.7.12.6_2, 8.12.x-6.4, 8.12.11.6_3
>
>         Attachments: NumberingPlan.csv, externalMaterializationOrderProblem-vdb.xml, mySqlCreateTable.sql, numberingPlan-vdb.xml
>
>
> When defining a View with external materialization, if the view does not specify the columns in the same order as they are defined in the Materialized Table, Teiid Server inserts data in the wrong columns (in the order that is defined in the view). It appears that Teiid Server does not use the columns names but instead uses the column indexes.
> Example:
> If the view is defined like this:
> {code:sql}
> CREATE VIEW my_view (
>    cns varchar(400),
>    country_code varchar(400)
> )
> {code}
> And the tables in the database are defined like this:
> {code:sql}
> CREATE TABLE my_view_cache_staging (
>     country_code VARCHAR(400),
>     cns VARCHAR(400)
>     
> );
> CREATE TABLE my_view_cache (
>    country_code VARCHAR(400),
>     cns VARCHAR(400)
> );
> {code}
> Then when loadMatView runs, it will insert in country_code column in database the values from cns (view) and in cns column in database the values from country_code (view).
> But if the view is defined like this:
> {code:sql}
> CREATE VIEW my_view (
>    country_code varchar(400),
>    cns varchar(400)	
> )
> {code}
> Then Teiid will insert the data "correctly".
> It appears that loadMatView is using indexes instead of column names to insert the data.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)



More information about the teiid-issues mailing list