[JBoss JIRA] (TEIID-4988) Oracle - table alias is not used in whole query
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4988?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-4988:
----------------------------------
Component/s: Query Engine
> Oracle - table alias is not used in whole query
> -----------------------------------------------
>
> Key: TEIID-4988
> URL: https://issues.jboss.org/browse/TEIID-4988
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.x-6.4
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
>
> When I run query like \[1\] Teiid translates it to query which does not use one of table aliases in whole query. Oracle (11g 11.2.0.2.0) seems to be sensitive to aliasing table and then not using it. Query fails. Source specific query (problematic one) \[2\].
> Sample query which fails if running directly against Oracle database \[3\]
> {code:sql|title=\[1\] Query}
> select
> s_name,
> s_address
> from
> tpch1.soaeds.supplier,
> tpch1.soaeds.nation
> where
> s_supplierkey in (
> select
> ps_supplierkey
> from
> tpch2.soaeds.partsupp
> where
> ps_partkey in (
> select
> p_partkey
> from
> tpch2.soaeds.part
> where
> p_name like 'powder%'
> )
> and ps_availqty > (
> select
> 0.5 * sum(l_quantity)
> from
> tpch2.soaeds.lineitem
> where
> l_partkey = ps_partkey
> and l_supplierkey = ps_supplierkey
> and l_shipdate >= '1994-01-01'
> and l_shipdate < TIMESTAMPADD(SQL_TSI_YEAR,'1', '1994-01-01')
> )
> )
> and s_nationkey = n_nationkey
> and n_name = 'BRAZIL'
> order by
> s_name;
> {code}
> {code:sql|title=\[2\] Source-specific query}
> SELECT g_0."PS_SUPPLIERKEY" AS c_0 FROM "SOAEDS"."PARTSUPP" g_0 WHERE g_0."PS_PARTKEY" IN (SELECT g_1."P_PARTKEY" FROM "SOAEDS"."PART" g_1 WHERE g_1."P_NAME" LIKE 'powder%') AND g_0."PS_AVAILQTY" > (SELECT (0.5 * SUM(g_2."L_QUANTITY")) FROM "SOAEDS"."LINEITEM" g_2 WHERE g_2."L_PARTKEY" = "SOAEDS"."PARTSUPP"."PS_PARTKEY" AND g_2."L_SUPPLIERKEY" = "SOAEDS"."PARTSUPP"."PS_SUPPLIERKEY" AND g_2."L_SHIPDATE" >= to_date('1994-01-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS') AND g_2."L_SHIPDATE" < ?) ORDER BY c_0
> {code}
> {code:sql|title=\[3\] Oracle query}
> SELECT smalla.intkey FROM smalla a
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 8 months
[JBoss JIRA] (TEIID-4990) Embedded Teiid with JPA layer Transaction Management detection
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-4990?page=com.atlassian.jira.plugin... ]
Ramesh Reddy resolved TEIID-4990.
---------------------------------
Resolution: Done
Added new scope called INHERITED to handle the transaction detected on the thread.
> Embedded Teiid with JPA layer Transaction Management detection
> --------------------------------------------------------------
>
> Key: TEIID-4990
> URL: https://issues.jboss.org/browse/TEIID-4990
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 9.0
> Reporter: Ramesh Reddy
> Assignee: Ramesh Reddy
> Fix For: 10.0
>
>
> When Embedded Teiid used with JPA layer, the JPA layer manages the transaction boundaries. Teiid does detect the ongoing transaction and mark it has the GLOBAL transaction, however in this case JPA layer does not enlist embedded as a participating source (this is not required either). This results, where embedded connection gets closed before any commit is called.
> However, when the session close is called, Teiid proactively tries to close the transaction, which is not correct.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 8 months
[JBoss JIRA] (TEIID-4970) Couchbase - GROUP BY returns empty result
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-4970?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-4970:
------------------------------------------------
Van Halbert <vhalbert(a)redhat.com> changed the Status of [bug 1466155|https://bugzilla.redhat.com/show_bug.cgi?id=1466155] from NEW to MODIFIED
> Couchbase - GROUP BY returns empty result
> -----------------------------------------
>
> Key: TEIID-4970
> URL: https://issues.jboss.org/browse/TEIID-4970
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Priority: Blocker
> Fix For: 10.0, 8.12.x-6.4, 9.3.1
>
>
> Issuing query like \[1\] returns empty result. Query seems to not be properly translated to source-specific query \[2\]
> {code:sql|title=\[1\] Query}
> SELECT IntKey, SUM(IntKey) AS Total FROM BQT1.SmallA GROUP BY IntKey
> {code}
> {code:plain|title=\[2\] Source-specific query - GROUP BY clause refers to cb_c2 instead of cb_c1}
> 09:53:09,066 DEBUG [org.teiid.CONNECTOR] (Worker5_QueryProcessorQueue64) TEIID29001 Source-specific Query: SELECT `$cb_c1_IntKey`, SUM(`$cb_c2_IntKey`) FROM `dvqe_small` `$cb_t1` LET `$cb_c1_IntKey` = `$cb_t1`.`IntKey`, `$cb_c2_IntKey` = `$cb_t1`.`IntKey` WHERE `$cb_t1`.`type` = 'SmallA' GROUP BY `$cb_c2_IntKey`
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 8 months
[JBoss JIRA] (TEIID-4972) Couchbase - query with comparison criteria not properly translated
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-4972?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-4972:
------------------------------------------------
Van Halbert <vhalbert(a)redhat.com> changed the Status of [bug 1466182|https://bugzilla.redhat.com/show_bug.cgi?id=1466182] from NEW to MODIFIED
> Couchbase - query with comparison criteria not properly translated
> ------------------------------------------------------------------
>
> Key: TEIID-4972
> URL: https://issues.jboss.org/browse/TEIID-4972
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Priority: Blocker
> Fix For: 10.0, 8.12.x-6.4, 9.3.1
>
>
> Issuing simple query with comparison criteria like \[1\] returns empty result. From what I can see, the query is not properly translated - it is translated to query with syntax error \[2\].
> Another issue here which I can see is that Teiid does not provide any information to the user that query actually failed. Only empty result is returned. This one, I will report it as a separate issue.
> {code:sql|title=\[1\] Query}
> SELECT BQT1.SmallA.FloatNum FROM BQT1.SmallA WHERE BQT1.SmallA.FloatNum = 7
> {code}
> {code:plain|title=\[2\] Source-specific query}
> 10:16:09,749 DEBUG [org.teiid.CONNECTOR] (Worker12_QueryProcessorQueue86) TEIID29001 Source-specific Query: SELECT TONUMBER(`$cb_c1_FloatNum`) FROM `dvqe_small` `$cb_t1` LET `$cb_c1_FloatNum` = `$cb_t1`.`FloatNum`TONUMBER() WHERE TONUMBER(`$cb_c1_FloatNum`) = 7.0 AND `$cb_t1`.`type` = 'SmallA'
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 8 months