[JBoss JIRA] (TEIID-3386) Mixed resutl with (double) full outer join and where clause
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3386?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-3386:
----------------------------------
Workaround Description:
Use a preserve hint around from clauses containing multiple full outer joins that can be pushed to oracle:
SELECT BQT1.SmallA.IntKey AS SmallA_IntKey, BQT1.MediumB.IntKey AS MediumB_IntKey, BQT1.MediumA.IntKey AS MediumA_IntKey FROM /*+ preserve */ ((BQT1.SmallA FULL OUTER JOIN BQT1.MediumB ON BQT1.SmallA.IntKey = BQT1.MediumB.IntKey) FULL OUTER JOIN BQT1.MediumA ON BQT1.MediumB.IntKey = BQT1.MediumA.IntKey) WHERE BQT1.MediumA.IntKey < 1500 ORDER BY MediumA_IntKey, MediumB_IntKey, SmallA_IntKey
Workaround: Workaround Exists
Added a workaround. I will likely resolve this without a code change based upon a workaround being available and that this an oracle bug that is addressed on later versions.
> Mixed resutl with (double) full outer join and where clause
> -----------------------------------------------------------
>
> Key: TEIID-3386
> URL: https://issues.jboss.org/browse/TEIID-3386
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Attachments: server.log
>
>
> If a query contains double FULL OUTER JOIN and WHERE clause that contains condition on column from last table, teiid returns mixed result (underlying oracle10).
> Query:
> SELECT BQT1.SmallA.IntKey AS SmallA_IntKey, BQT2.MediumB.IntKey AS MediumB_IntKey, BQT2.LargeB.IntKey AS LargeB_IntKey
> FROM (BQT1.SmallA FULL OUTER JOIN BQT2.MediumB ON BQT1.SmallA.IntKey = BQT2.MediumB.IntKey) FULL OUTER JOIN BQT2.LargeB ON BQT2.MediumB.IntKey = BQT2.LargeB.IntKey
> WHERE BQT2.LargeB.IntKey < 1500 ORDER BY LargeB_IntKey, MediumB_IntKey, SmallA_IntKey;
> Actual result:
> 0 0 0
> 1 1 1
> 2 2 2
> 3 3 3
> ... ... ...
> 49 49 49
> 50 50 50
> ... ... ...
> 999 999 999
> <null> <null> 1000
> ... ... ...
> <null> <null> 1499
> Expected result:
> 0 0 0
> 1 1 1
> 2 2 2
> 3 3 3
> ... ... ...
> 49 49 49
> <null> 50 50
> ... ... ...
> 999 999 999
> <null> <null> 1000
> ... ... ...
> <null> <null> 1499
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 9 months
[JBoss JIRA] (TEIID-3358) Issues with entity set names
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-3358?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration updated TEIID-3358:
-------------------------------------------
Bugzilla Update: Perform
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1208515
> Issues with entity set names
> ----------------------------
>
> Key: TEIID-3358
> URL: https://issues.jboss.org/browse/TEIID-3358
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 8.7
> Reporter: Steven Hawkins
> Assignee: Ramesh Reddy
> Labels: Alpha1
> Fix For: 8.11
>
>
> The entity set name used for sql generation should be the fully qualified name. If there is for example two table with the same names in schemas visible to odata, but one of the tables does not have a key, then an ambiguous name exception will be thrown if an odata url is used with only the base table name.
> It also appears that the URI link in the results metadata uses the non-qualified table name, which will have issues in the scenario above.
> We may also need to document or add an additional check for ambiguity as the OData4j findEdmEntitySet logic will return the first matching entity, which is generally against our approach to resolving.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 9 months
[JBoss JIRA] (TEIID-3058) Cassandra: cannot compare timestamp field in where clause
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3058?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3058:
---------------------------------------
The existing logic seems to work fine for Cassandra 2.0.9 with CQL 3.1.1. Can you provide more details about the exception you are now seeing, what version are you using, etc.?
> Cassandra: cannot compare timestamp field in where clause
> ----------------------------------------------------------
>
> Key: TEIID-3058
> URL: https://issues.jboss.org/browse/TEIID-3058
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.7, 8.10
> Environment: Cassandra with Teiid 8.7
> Reporter: Ivan Chan
> Assignee: Steven Hawkins
> Fix For: 8.7.1, 8.9
>
>
> It seems like Teiid is having problem to compare translate CQL if there is timestamp comparison in where clause:
> ORIGINAL SQL:
> select "cassandrads_sales"."product_family" as "cassandrads_sales_product_family",
> "cassandrads_sales"."product_family" as "cassandrads_sales_product_family1"
> from "cassandrads"."sales" "cassandrads_sales"
> where "cassandrads_sales"."the_date" <= '2013-05-01 00:00:00'
> limit 1000
> TRANSLATED CQL:
> SELECT cassandrads.sales.product_family FROM cassandrads.sales WHERE cassandrads.sales.the_date <= {ts'2013-05-01 00:00:00.0'} LIMIT 1000
> And I got this error:
> Caused by: org.teiid.translator.TranslatorException: line 1:55 no viable alternative at input '2013-05-01 00:00:0
> at org.teiid.translator.cassandra.CassandraQueryExecution.execute(CassandraQueryExecution.java:80)
> at org.teiid.translator.cassandra.CassandraQueryExecution.execute(CassandraQueryExecution.java:72)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:325)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:298)
> at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:135)
> If it is not possible to do time/ data comparison for CQL, maybe you guys should consider to do it in memory instead. Thanks.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
9 years, 9 months