[JBoss JIRA] (TEIID-4727) Aggregation is performed incorrectly for JOIN queries
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4727?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4727.
-----------------------------------
Fix Version/s: 9.0.6
9.2
9.1.3
Resolution: Done
My initial assessment was incorrect. It was more of an issue when the aggregation was targeted at a non-access node. That needed to be handled the same as the case when it originates at the join.
> Aggregation is performed incorrectly for JOIN queries
> -----------------------------------------------------
>
> Key: TEIID-4727
> URL: https://issues.jboss.org/browse/TEIID-4727
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 9.0.3
> Environment: teiid-9.0.3 on WildFly Full 9.0.2.Final (WildFly Core 1.0.2.Final)
> Reporter: dalex dalex
> Assignee: Steven Hawkins
> Priority: Blocker
> Fix For: 9.0.6, 9.2, 9.1.3
>
>
> Aggregation is performed incorrectly for JOIN queries, like this
> {code:sql}
> select count(v2.b) from views.v1 right join views.v2 on true group by v1.b;
> select count(v2.b) from views.v1 join (call procs.pr()) v2 on true group by v1.b;
> select count(v2.b) from views.v1 left join (call procs.pr()) v2 on true group by v1.b;
> select count(v2.b) from views.v1 right join (call procs.pr()) v2 on true group by v1.b;
> {code}
> showing as a result:
> {code}
> 1
> 1
> 1
> {code}
> though these ones work correctly:
> {code:sql}
> select count(v2.b) from views.v1 join views.v2 on true group by v1.b;
> select count(v2.b) from views.v1 left join views.v2 on true group by v1.b;
> {code}
> showing
> {code}
> 1
> 1
> 2
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months
[JBoss JIRA] (TEIID-4730) Problem with Import VDB with Materialized View (external)
by Pedro Inácio (JIRA)
Pedro Inácio created TEIID-4730:
-----------------------------------
Summary: Problem with Import VDB with Materialized View (external)
Key: TEIID-4730
URL: https://issues.jboss.org/browse/TEIID-4730
Project: Teiid
Issue Type: Bug
Components: Common
Affects Versions: 9.1.2
Environment: * Teiid 9.1.2
* CentOs 7
* WildFly 10
Reporter: Pedro Inácio
Assignee: Steven Hawkins
Attachments: externalMaterializationOrderProblem-vdb.xml
Having defined a VDB which contains a Model that has External Materialization, when importing this VDB into another that also uses External Materialization, Teiid Server is searching in the wrong place for the view status.
Example:
..
<import-vdb name="CountryServiceListVDB" version="1" import-data-policies="true"/>
...
<model name="MyView" type="VIRTUAL">
...
SELECT cns,
country_code
FROM NumberingPlan.numbering_plan;
....
</metadata>
</model>
*NumberingPlan.numbering_plan is defined in the imported VDB, and is also Materialized.*
*Warning in Logs: *
17:51:45,161 WARN [org.teiid.MATVIEWS] (Worker8_QueryProcessorQueue10653) n9M6de3y5xHM org.teiid.jdbc.TeiidSQLException: TEIID30328 Unable to evaluate (SELECT mvstatus('NumberingPlan', 'numbering_plan', Valid, LoadState, 'THROW_EXCEPTION') FROM (SELECT 1) AS x LEFT OUTER JOIN NumberingPlanMaterialized.status ON VDBName = 'ExternalMaterializationOrderProblem' AND VDBVersion = '1' AND SchemaName = 'NumberingPlan' AND Name = 'numbering_plan' LIMIT 2): TEIID30328 Unable to evaluate mvstatus('NumberingPlan', 'numbering_plan', Valid, LoadState, 'THROW_EXCEPTION'): TEIID30384 Error while evaluating function mvstatus
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months
[JBoss JIRA] (TEIID-4729) Multisource SOURCE_NAME field pushes to source
by Debbie Steigner (JIRA)
Debbie Steigner created TEIID-4729:
--------------------------------------
Summary: Multisource SOURCE_NAME field pushes to source
Key: TEIID-4729
URL: https://issues.jboss.org/browse/TEIID-4729
Project: Teiid
Issue Type: Bug
Affects Versions: 8.12.6.6_3
Reporter: Debbie Steigner
Assignee: Steven Hawkins
If a view transformation contains a union of a multi-source model and a non multisource model, because of https://issues.jboss.org/browse/TEIID-4728 the SOURCE_NAME column has to be created on the View and hence on the non-multisource model and if you don't mark that source model as multisource the SOURCE_NAME column is pushed to the source.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<vdb name="multi_emp" version="1">
<description/>
<property name="validationDateTime" value="Mon Oct 31 08:01:36 CDT 2016"/>
<property name="validationVersion" value="8.12.6"/>
<model name="multi" type="PHYSICAL" visible="true">
<property name="multisource" value="true"/>
<!-- optional properties -->
<property name="multisource.columnName" value="SOURCE_NAME"/>
<property name="multisource.addColumn" value="true"/>
<source connection-jndi-name="java:/deb" name="deb" translator-name="postgresql"/>
<source connection-jndi-name="java:/dv63" name="dv63" translator-name="postgresql"/>
<metadata type="DDL"><![CDATA[
CREATE FOREIGN TABLE emp (
id integer NOT NULL OPTIONS(NAMEINSOURCE '"id"', NATIVE_TYPE 'int4', CASE_SENSITIVE 'FALSE', FIXED_LENGTH 'TRUE', SEARCHABLE 'ALL_EXCEPT_LIKE'),
name string(2147483647) OPTIONS(NAMEINSOURCE '"name"', NATIVE_TYPE 'text'),
SOURCE_NAME string(50),
CONSTRAINT pk_emp PRIMARY KEY(id)
) OPTIONS(UPDATABLE 'true',NAMEINSOURCE '"public"."emp"')
]]></metadata>
</model>
<model name="Debbiedb" type="PHYSICAL" visible="true">
<!-- Have to add this to make it work <property name="multisource" value="true"/> -->
<source connection-jndi-name="java:/debbiedb" name="debbiedb" translator-name="postgresql"/>
<metadata type="DDL"><![CDATA[
CREATE FOREIGN TABLE mytable (
id integer NOT NULL OPTIONS(NAMEINSOURCE '"id"', NATIVE_TYPE 'int4', CASE_SENSITIVE 'FALSE', FIXED_LENGTH 'TRUE', SEARCHABLE 'ALL_EXCEPT_LIKE'),
name string(2147483647) OPTIONS(NAMEINSOURCE '"name"', NATIVE_TYPE 'text'),
age integer OPTIONS(NAMEINSOURCE '"age"', NATIVE_TYPE 'int4', CASE_SENSITIVE 'FALSE', FIXED_LENGTH 'TRUE', SEARCHABLE 'ALL_EXCEPT_LIKE'),
address string(2147483647) OPTIONS(NAMEINSOURCE '"address"', NATIVE_TYPE 'text'),
SOURCE_NAME string(50),
CONSTRAINT pk_id PRIMARY KEY(id)
) OPTIONS(UPDATABLE 'true',NAMEINSOURCE '"public"."mytable"')
]]></metadata>
</model>
<model name="Debbiev" type="VIRTUAL" visible="true">
<property name="imports" value="Debbiedb"/>
<property name="imports" value="multi"/>
<metadata type="DDL"><![CDATA[
CREATE VIEW comboview (
id integer,
name string(100),
SOURCE_NAME string(50)
)
AS
SELECT id,name,SOURCE_NAME FROM multi.emp UNION ALL SELECT id, name, SOURCE_NAME FROM Debbiedb.mytable
]]></metadata>
</model>
</vdb>
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months
[JBoss JIRA] (TEIID-4728) Views are not multi-source aware - only source tables
by Debbie Steigner (JIRA)
[ https://issues.jboss.org/browse/TEIID-4728?page=com.atlassian.jira.plugin... ]
Debbie Steigner updated TEIID-4728:
-----------------------------------
> Views are not multi-source aware - only source tables
> -----------------------------------------------------
>
> Key: TEIID-4728
> URL: https://issues.jboss.org/browse/TEIID-4728
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.12.6.6_3
> Reporter: Debbie Steigner
> Assignee: Steven Hawkins
>
> Views are not multi-source aware - only source tables. You have to explicitly have a source_name column on the view that maps to the respective source name columns in Dynamic VDB.
> I'm not using Designer just a very basic dynamic VDB[1], if I "select
> id, SOURCE_NAME from emp" I get results, this is the physical table. If
> I query the empview, select id, SOURCE_NAME from empview I get the teiid
> processor error "TEIID30020 Processing exception for request
> MwpyLkSYMked.14 'TEIID31118 Element "SOURCE_NAME" is not defined by any
> relevant group.' unless I add the SOURCE_NAME column to the view, so it
> doesn't even make it to a source query.
> [1]
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <vdb name="multi_basic" version="1">
> <description/>
> <property name="validationDateTime" value="Mon Oct 31 08:01:36 CDT 2016"/>
> <property name="validationVersion" value="8.12.6"/>
> <model name="multi_phy" type="PHYSICAL" visible="true">
> <property name="multisource" value="true"/>
> <source connection-jndi-name="java:/deb" name="deb"
> translator-name="postgresql"/>
> <source connection-jndi-name="java:/dv63" name="dv63"
> translator-name="postgresql"/>
> <metadata type="DDL"><![CDATA[
> CREATE FOREIGN TABLE emp (
> id integer NOT NULL OPTIONS(NAMEINSOURCE '"id"', NATIVE_TYPE
> 'int4', CASE_SENSITIVE 'FALSE', FIXED_LENGTH 'TRUE', SEARCHABLE
> 'ALL_EXCEPT_LIKE'),
> name string(2147483647) OPTIONS(NAMEINSOURCE '"name"', NATIVE_TYPE
> 'text'),
> SOURCE_NAME string(50),
> CONSTRAINT pk_emp PRIMARY KEY(id)
> ) OPTIONS(UPDATABLE 'true',NAMEINSOURCE '"public"."emp"')
> ]]></metadata>
> </model>
> <model name="multiv" type="VIRTUAL" visible="true">
> <property name="imports" value="multi"/>
> <metadata type="DDL"><![CDATA[
> CREATE VIEW empview (
> id integer,
> name string(100)
> )
> AS
> SELECT id,name FROM multi_phy.emp
> ]]></metadata>
> </model>
> </vdb>
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months
[JBoss JIRA] (TEIID-4728) Views are not multi-source aware - only source tables
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4728?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4728.
-----------------------------------
Resolution: Rejected
This is expected. Views are not multi-source as they not tied to a particular multi-source model.
> Views are not multi-source aware - only source tables
> -----------------------------------------------------
>
> Key: TEIID-4728
> URL: https://issues.jboss.org/browse/TEIID-4728
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.12.6.6_3
> Reporter: Debbie Steigner
> Assignee: Steven Hawkins
>
> Views are not multi-source aware - only source tables. You have to explicitly have a source_name column on the view that maps to the respective source name columns in Dynamic VDB.
> I'm not using Designer just a very basic dynamic VDB[1], if I "select
> id, SOURCE_NAME from emp" I get results, this is the physical table. If
> I query the empview, select id, SOURCE_NAME from empview I get the teiid
> processor error "TEIID30020 Processing exception for request
> MwpyLkSYMked.14 'TEIID31118 Element "SOURCE_NAME" is not defined by any
> relevant group.' unless I add the SOURCE_NAME column to the view, so it
> doesn't even make it to a source query.
> [1]
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <vdb name="multi_basic" version="1">
> <description/>
> <property name="validationDateTime" value="Mon Oct 31 08:01:36 CDT 2016"/>
> <property name="validationVersion" value="8.12.6"/>
> <model name="multi_phy" type="PHYSICAL" visible="true">
> <property name="multisource" value="true"/>
> <source connection-jndi-name="java:/deb" name="deb"
> translator-name="postgresql"/>
> <source connection-jndi-name="java:/dv63" name="dv63"
> translator-name="postgresql"/>
> <metadata type="DDL"><![CDATA[
> CREATE FOREIGN TABLE emp (
> id integer NOT NULL OPTIONS(NAMEINSOURCE '"id"', NATIVE_TYPE
> 'int4', CASE_SENSITIVE 'FALSE', FIXED_LENGTH 'TRUE', SEARCHABLE
> 'ALL_EXCEPT_LIKE'),
> name string(2147483647) OPTIONS(NAMEINSOURCE '"name"', NATIVE_TYPE
> 'text'),
> SOURCE_NAME string(50),
> CONSTRAINT pk_emp PRIMARY KEY(id)
> ) OPTIONS(UPDATABLE 'true',NAMEINSOURCE '"public"."emp"')
> ]]></metadata>
> </model>
> <model name="multiv" type="VIRTUAL" visible="true">
> <property name="imports" value="multi"/>
> <metadata type="DDL"><![CDATA[
> CREATE VIEW empview (
> id integer,
> name string(100)
> )
> AS
> SELECT id,name FROM multi_phy.emp
> ]]></metadata>
> </model>
> </vdb>
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months
[JBoss JIRA] (TEIID-4728) Views are not multi-source aware - only source tables
by Debbie Steigner (JIRA)
Debbie Steigner created TEIID-4728:
--------------------------------------
Summary: Views are not multi-source aware - only source tables
Key: TEIID-4728
URL: https://issues.jboss.org/browse/TEIID-4728
Project: Teiid
Issue Type: Bug
Affects Versions: 8.12.6.6_3
Reporter: Debbie Steigner
Assignee: Steven Hawkins
Views are not multi-source aware - only source tables. You have to explicitly have a source_name column on the view that maps to the respective source name columns in Dynamic VDB.
I'm not using Designer just a very basic dynamic VDB[1], if I "select
id, SOURCE_NAME from emp" I get results, this is the physical table. If
I query the empview, select id, SOURCE_NAME from empview I get the teiid
processor error "TEIID30020 Processing exception for request
MwpyLkSYMked.14 'TEIID31118 Element "SOURCE_NAME" is not defined by any
relevant group.' unless I add the SOURCE_NAME column to the view, so it
doesn't even make it to a source query.
[1]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<vdb name="multi_basic" version="1">
<description/>
<property name="validationDateTime" value="Mon Oct 31 08:01:36 CDT 2016"/>
<property name="validationVersion" value="8.12.6"/>
<model name="multi_phy" type="PHYSICAL" visible="true">
<property name="multisource" value="true"/>
<source connection-jndi-name="java:/deb" name="deb"
translator-name="postgresql"/>
<source connection-jndi-name="java:/dv63" name="dv63"
translator-name="postgresql"/>
<metadata type="DDL"><![CDATA[
CREATE FOREIGN TABLE emp (
id integer NOT NULL OPTIONS(NAMEINSOURCE '"id"', NATIVE_TYPE
'int4', CASE_SENSITIVE 'FALSE', FIXED_LENGTH 'TRUE', SEARCHABLE
'ALL_EXCEPT_LIKE'),
name string(2147483647) OPTIONS(NAMEINSOURCE '"name"', NATIVE_TYPE
'text'),
SOURCE_NAME string(50),
CONSTRAINT pk_emp PRIMARY KEY(id)
) OPTIONS(UPDATABLE 'true',NAMEINSOURCE '"public"."emp"')
]]></metadata>
</model>
<model name="multiv" type="VIRTUAL" visible="true">
<property name="imports" value="multi"/>
<metadata type="DDL"><![CDATA[
CREATE VIEW empview (
id integer,
name string(100)
)
AS
SELECT id,name FROM multi_phy.emp
]]></metadata>
</model>
</vdb>
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months