[JBoss JIRA] (TEIID-3756) Order By clause specified in STRING_AGG function is skipped when pushed down to PostgreSQL
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3756?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-3756.
-----------------------------------
Resolution: Done
Updated the language bridge to account for aggregate ordering and the pushdown check for collation.
> Order By clause specified in STRING_AGG function is skipped when pushed down to PostgreSQL
> ------------------------------------------------------------------------------------------
>
> Key: TEIID-3756
> URL: https://issues.jboss.org/browse/TEIID-3756
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.4
> Reporter: Salvatore R
> Assignee: Steven Hawkins
> Fix For: 8.12, 8.11.5
>
>
> I defined a small table in PostgreSQL as follows:
> {code:sql}
> create table test_string_agg (col1 varchar(10))
> insert into test_string_agg VALUES ('b');
> insert into test_string_agg VALUES ('a');
> insert into test_string_agg VALUES ('c');
> {code}
> When I run a query with a STRING_AGG function where an ORDER BY clause is specified, the strings are not concatenated in the expected order. For example, these three queries:
> {code:sql}
> select string_agg(col1, ' , ' order by col1) from pg.test_string_agg;
> select string_agg(col1, ' , ' order by col1 desc) from pg.test_string_agg;
> select string_agg(col1, ' , ' order by col1 asc) from pg.test_string_agg;
> {code}
> return all the same result "b , a , c".
> It seems that the ORDER BY clause is not pushed down to PostgreSQL, in fact all the three rewritten queries executed in PostgreSQL look like:
> {code:sql}
> SELECT STRING_AGG(g_0."col1", ' , ') FROM "public"."test_string_agg" AS g_0
> {code}
> If the STRING_AGG function is not pushed down (e.g. in MySQL), I get an expected result.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (TEIID-3756) Order By clause specified in STRING_AGG function is skipped when pushed down to PostgreSQL
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3756?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-3756:
----------------------------------
Component/s: Query Engine
Fix Version/s: 8.12
8.11.5
Affects Version/s: 8.4
> Order By clause specified in STRING_AGG function is skipped when pushed down to PostgreSQL
> ------------------------------------------------------------------------------------------
>
> Key: TEIID-3756
> URL: https://issues.jboss.org/browse/TEIID-3756
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.4
> Reporter: Salvatore R
> Assignee: Steven Hawkins
> Fix For: 8.12, 8.11.5
>
>
> I defined a small table in PostgreSQL as follows:
> {code:sql}
> create table test_string_agg (col1 varchar(10))
> insert into test_string_agg VALUES ('b');
> insert into test_string_agg VALUES ('a');
> insert into test_string_agg VALUES ('c');
> {code}
> When I run a query with a STRING_AGG function where an ORDER BY clause is specified, the strings are not concatenated in the expected order. For example, these three queries:
> {code:sql}
> select string_agg(col1, ' , ' order by col1) from pg.test_string_agg;
> select string_agg(col1, ' , ' order by col1 desc) from pg.test_string_agg;
> select string_agg(col1, ' , ' order by col1 asc) from pg.test_string_agg;
> {code}
> return all the same result "b , a , c".
> It seems that the ORDER BY clause is not pushed down to PostgreSQL, in fact all the three rewritten queries executed in PostgreSQL look like:
> {code:sql}
> SELECT STRING_AGG(g_0."col1", ' , ') FROM "public"."test_string_agg" AS g_0
> {code}
> If the STRING_AGG function is not pushed down (e.g. in MySQL), I get an expected result.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (TEIID-3756) Order By clause specified in STRING_AGG function is skipped when pushed down to PostgreSQL
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3756?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3756:
---------------------------------------
Yes the translator layer does not yet consider aggregate orderings. This will be corrected for 8.12 final.
> Order By clause specified in STRING_AGG function is skipped when pushed down to PostgreSQL
> ------------------------------------------------------------------------------------------
>
> Key: TEIID-3756
> URL: https://issues.jboss.org/browse/TEIID-3756
> Project: Teiid
> Issue Type: Bug
> Reporter: Salvatore R
> Assignee: Steven Hawkins
>
> I defined a small table in PostgreSQL as follows:
> {code:sql}
> create table test_string_agg (col1 varchar(10))
> insert into test_string_agg VALUES ('b');
> insert into test_string_agg VALUES ('a');
> insert into test_string_agg VALUES ('c');
> {code}
> When I run a query with a STRING_AGG function where an ORDER BY clause is specified, the strings are not concatenated in the expected order. For example, these three queries:
> {code:sql}
> select string_agg(col1, ' , ' order by col1) from pg.test_string_agg;
> select string_agg(col1, ' , ' order by col1 desc) from pg.test_string_agg;
> select string_agg(col1, ' , ' order by col1 asc) from pg.test_string_agg;
> {code}
> return all the same result "b , a , c".
> It seems that the ORDER BY clause is not pushed down to PostgreSQL, in fact all the three rewritten queries executed in PostgreSQL look like:
> {code:sql}
> SELECT STRING_AGG(g_0."col1", ' , ') FROM "public"."test_string_agg" AS g_0
> {code}
> If the STRING_AGG function is not pushed down (e.g. in MySQL), I get an expected result.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (TEIID-3756) Order By clause specified in STRING_AGG function is skipped when pushed down to PostgreSQL
by Salvatore R (JIRA)
Salvatore R created TEIID-3756:
----------------------------------
Summary: Order By clause specified in STRING_AGG function is skipped when pushed down to PostgreSQL
Key: TEIID-3756
URL: https://issues.jboss.org/browse/TEIID-3756
Project: Teiid
Issue Type: Bug
Reporter: Salvatore R
Assignee: Steven Hawkins
I defined a small table in PostgreSQL as follows:
{code:sql}
create table test_string_agg (col1 varchar(10))
insert into test_string_agg VALUES ('b');
insert into test_string_agg VALUES ('a');
insert into test_string_agg VALUES ('c');
{code}
When I run a query with a STRING_AGG function where an ORDER BY clause is specified, the strings are not concatenated in the expected order. For example, these three queries:
{code:sql}
select string_agg(col1, ' , ' order by col1) from pg.test_string_agg;
select string_agg(col1, ' , ' order by col1 desc) from pg.test_string_agg;
select string_agg(col1, ' , ' order by col1 asc) from pg.test_string_agg;
{code}
return all the same result "b , a , c".
It seems that the ORDER BY clause is not pushed down to PostgreSQL, in fact all the three rewritten queries executed in PostgreSQL look like:
{code:sql}
SELECT STRING_AGG(g_0."col1", ' , ') FROM "public"."test_string_agg" AS g_0
{code}
If the STRING_AGG function is not pushed down (e.g. in MySQL), I get an expected result.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (TEIID-3669) Look at consolidating to a single session service
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-3669?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-3669:
-------------------------------------
No, I believe we had few challenges before about service availability, which we need to overcome for this model.
> Look at consolidating to a single session service
> -------------------------------------------------
>
> Key: TEIID-3669
> URL: https://issues.jboss.org/browse/TEIID-3669
> Project: Teiid
> Issue Type: Quality Risk
> Components: Server
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 9.0
>
>
> We should consider moving back to a single session service in Teiid 9 as most of the constraints will be specified on a vdb basis (such as security domain, auth type, etc.) and the separation in the session service causes issues with sessions originating in different transports - TEIID-3663
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months
[JBoss JIRA] (TEIID-3669) Look at consolidating to a single session service
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3669?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-3669:
---------------------------------------
Ramesh do you mind if we move this direction? Having a single session service will help reduce the amount of session management and should simplify the configuration as well. It's also already the design of Teiid embedded.
> Look at consolidating to a single session service
> -------------------------------------------------
>
> Key: TEIID-3669
> URL: https://issues.jboss.org/browse/TEIID-3669
> Project: Teiid
> Issue Type: Quality Risk
> Components: Server
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 9.0
>
>
> We should consider moving back to a single session service in Teiid 9 as most of the constraints will be specified on a vdb basis (such as security domain, auth type, etc.) and the separation in the session service causes issues with sessions originating in different transports - TEIID-3663
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 3 months