[JBoss JIRA] (TEIID-5336) Improve TEIID-5253
by Jan Stastny (JIRA)
[ https://issues.jboss.org/browse/TEIID-5336?page=com.atlassian.jira.plugin... ]
Jan Stastny commented on TEIID-5336:
------------------------------------
[~shawkins]
{code}
15:18:22,673 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "teiid5313-vdb.xml" (runtime-name: "teiid5313-vdb.xml")
15:18:22,767 ERROR [stderr] (MSC service thread 1-6) ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.sun.script.javascript.RhinoScriptEngineFactory not found
15:18:22,775 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.teiid.vdb.emptyvdb.1: org.jboss.msc.service.StartException in service jboss.teiid.vdb.emptyvdb.1: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:2010) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_151]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_151]
Caused by: java.lang.IllegalStateException
at org.jboss.msc.value.InjectedValue.getValue(InjectedValue.java:47) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1]
at org.teiid.jboss.VDBService.start(VDBService.java:162)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2064) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1987) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1]
... 3 more
15:18:22,778 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 7) JBAS014612: Operation ("deploy") failed - address: ([("deployment" => "teiid5313-vdb.xml")]) - failure description: {"JBAS014671: Failed services" => {"jboss.teiid.vdb.emptyvdb.1" => "org.jboss.msc.service.StartException in service jboss.teiid.vdb.emptyvdb.1: Failed to start service
Caused by: java.lang.IllegalStateException"}}
15:18:22,790 ERROR [org.jboss.as.server] (management-handler-thread - 7) JBAS015870: Deploy of deployment "teiid5313-vdb.xml" was rolled back with the following failure message:
{"JBAS014671: Failed services" => {"jboss.teiid.vdb.emptyvdb.1" => "org.jboss.msc.service.StartException in service jboss.teiid.vdb.emptyvdb.1: Failed to start service
Caused by: java.lang.IllegalStateException"}}
{code}
> Improve TEIID-5253
> -------------------
>
> Key: TEIID-5336
> URL: https://issues.jboss.org/browse/TEIID-5336
> Project: Teiid
> Issue Type: Quality Risk
> Components: Server
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 10.3, 10.1.4, 10.2.2, 8.12.14.6_4
>
>
> The fix for TEIID-5253 still allows for a narrow chance of the resteasy and materializationmanager listeners being run twice. We can improve upon this by making these services required for the vdbservice.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months
[JBoss JIRA] (TEIID-5135) REPEAT function truncates strings to 4000 characters
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5135?page=com.atlassian.jira.plugin... ]
Work on TEIID-5135 started by Steven Hawkins.
---------------------------------------------
> REPEAT function truncates strings to 4000 characters
> ----------------------------------------------------
>
> Key: TEIID-5135
> URL: https://issues.jboss.org/browse/TEIID-5135
> Project: Teiid
> Issue Type: Quality Risk
> Components: Query Engine
> Affects Versions: 9.3.4
> Environment: teiid-9.3.4 on WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final)
> Reporter: dalex dalex
> Assignee: Steven Hawkins
> Priority: Minor
> Fix For: 11.0
>
>
> Probably it's not bug. When running the following queries:
> {code:sql}
> Select Length(Repeat('abcde', 9000));; /* 4000 chars */
> Select Length(Repeat('a', 9000));; /* 4000 chars */
> {code}
> Teiid returns 4000 instead of 9000. Can the internal truncation be avoided (maybe in some cases) or not?
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months
[JBoss JIRA] (TEIID-5369) enableDependentJoins for Redshift translator
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5369?page=com.atlassian.jira.plugin... ]
Work on TEIID-5369 started by Steven Hawkins.
---------------------------------------------
> enableDependentJoins for Redshift translator
> --------------------------------------------
>
> Key: TEIID-5369
> URL: https://issues.jboss.org/browse/TEIID-5369
> Project: Teiid
> Issue Type: Enhancement
> Components: JDBC Connector
> Reporter: Chandra Akkinepalli
> Assignee: Steven Hawkins
> Fix For: 11.0
>
>
> When using Translator overwrite property enableDependentJoins with Redshift translator, we got the following error.
> Caused by: java.sql.SQLException: [Amazon](500310) Invalid operation: CREATE TEMP TABLE ON COMMIT is not supported; at com.amazon.redshift.client.messages.inbound.ErrorResponse.toErrorException(ErrorResponse.java:1830) ... 30 lines omitted ... at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) Caused by: com.amazon.support.exceptions.ErrorException: [Amazon](500310) Invalid operation: CREATE TEMP TABLE ON COMMIT is not supported; ... 32 more
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months
[JBoss JIRA] (TEIID-5367) Table names cannot begin with . or contain repeated .
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5367?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5367.
-----------------------------------
Resolution: Done
Addressed the sql stringification for starting/ending with and containing repeated periods. At some point we need to overhaul the naming logic to use a proper three part structure.
> Table names cannot begin with . or contain repeated .
> -----------------------------------------------------
>
> Key: TEIID-5367
> URL: https://issues.jboss.org/browse/TEIID-5367
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 11.0
>
>
> Although unlikely there are some restrictions on table names based upon the stringification and other logic.
> select * from ".tbl"
> or
> select * from "tbl..name"
> both result in an exception.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months
[JBoss JIRA] (TEIID-5354) Different results for a query with GROUP BY and SUM(1) (summation of the number 1) when there is a LEFT or INNER JOIN involved
by Jan Stastny (JIRA)
[ https://issues.jboss.org/browse/TEIID-5354?page=com.atlassian.jira.plugin... ]
Jan Stastny commented on TEIID-5354:
------------------------------------
[~shawkins] Ok, I am able to reproduce the issue. I am getting rows containing number 1 instead of the same value as the count\(*\) aggregate.
> Different results for a query with GROUP BY and SUM(1) (summation of the number 1) when there is a LEFT or INNER JOIN involved
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-5354
> URL: https://issues.jboss.org/browse/TEIID-5354
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 10.2
> Environment: teiid-10.2.0 on WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final)
> Reporter: dalex dalex
> Assignee: Steven Hawkins
> Priority: Blocker
> Fix For: 11.0, 10.3.2, 10.2.3, 8.12.14.6_4
>
> Attachments: address_pg.sql, stateprovince_mysql.sql
>
>
> Teiid returns different results for a query with GROUP BY and SUM(1) (summation of the number 1) when there is a LEFT or INNER JOIN involved.
> There are two problems: a) incorrect check in MergeJoinStrategy.compareToPrevious method which generates TEIID31202 exception and b) a bug in algorithm of join itself which leads to incorrect results.
> To reproduce the bug, please, run the following queries and compare theSum and theCount column values:
> {code:sql}
> select r.city,
> sum(1) as theSum
> ,count(*) as theCount
> from "dsp.address_pg" r
> left join "adventureworks.stateprovince" c on "r.stateprovinceid" = "c.stateprovinceid"
> group by r.city
> order by r.city ;;
> {code}
> {code:sql}
> select r.city,
> sum(1) as theSum
> ,count(*) as theCount
> from "dsp.address_pg" r
> inner join "adventureworks.stateprovince" c on "r.stateprovinceid" = "c.stateprovinceid"
> group by r.city
> order by r.city ;;
> {code}
> but the following queries return correct results:
> {code:sql}
> select r.city,
> sum(1) as theSum
> ,count(*) as theCount
> from "dsp.address_pg" r
> right join "adventureworks.stateprovince" c on "r.stateprovinceid" = "c.stateprovinceid"
> group by r.city
> order by r.city ;;
> {code}
> the second one is also correct (LEFT JOIN) but uses window function:
> {code:sql}
> select distinct city,
> sum(1) OVER (PARTITION BY city) as theSum
> ,count(*) OVER (PARTITION BY city) as theCount
> from "dsp.address_pg" r
> left join "adventureworks.stateprovince" c on "r.stateprovinceid" = "c.stateprovinceid"
> order by r.city ;;
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months
[JBoss JIRA] (TEIID-5354) Different results for a query with GROUP BY and SUM(1) (summation of the number 1) when there is a LEFT or INNER JOIN involved
by Jan Stastny (JIRA)
[ https://issues.jboss.org/browse/TEIID-5354?page=com.atlassian.jira.plugin... ]
Jan Stastny commented on TEIID-5354:
------------------------------------
Hello [~shawkins],
> b) a bug in algorithm of join itself which leads to incorrect results.
what was the issue about? with the example query:
{code:sql}
select r.city,
sum(1) as theSum
,count(*) as theCount
from "dsp.address_pg" r
left join "adventureworks.stateprovince" c on "r.stateprovinceid" = "c.stateprovinceid"
group by r.city
order by r.city ;;
{code}
were there different values for sum(1) and count\(*\) showing?
> Different results for a query with GROUP BY and SUM(1) (summation of the number 1) when there is a LEFT or INNER JOIN involved
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-5354
> URL: https://issues.jboss.org/browse/TEIID-5354
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 10.2
> Environment: teiid-10.2.0 on WildFly Full 11.0.0.Final (WildFly Core 3.0.8.Final)
> Reporter: dalex dalex
> Assignee: Steven Hawkins
> Priority: Blocker
> Fix For: 11.0, 10.3.2, 10.2.3, 8.12.14.6_4
>
> Attachments: address_pg.sql, stateprovince_mysql.sql
>
>
> Teiid returns different results for a query with GROUP BY and SUM(1) (summation of the number 1) when there is a LEFT or INNER JOIN involved.
> There are two problems: a) incorrect check in MergeJoinStrategy.compareToPrevious method which generates TEIID31202 exception and b) a bug in algorithm of join itself which leads to incorrect results.
> To reproduce the bug, please, run the following queries and compare theSum and theCount column values:
> {code:sql}
> select r.city,
> sum(1) as theSum
> ,count(*) as theCount
> from "dsp.address_pg" r
> left join "adventureworks.stateprovince" c on "r.stateprovinceid" = "c.stateprovinceid"
> group by r.city
> order by r.city ;;
> {code}
> {code:sql}
> select r.city,
> sum(1) as theSum
> ,count(*) as theCount
> from "dsp.address_pg" r
> inner join "adventureworks.stateprovince" c on "r.stateprovinceid" = "c.stateprovinceid"
> group by r.city
> order by r.city ;;
> {code}
> but the following queries return correct results:
> {code:sql}
> select r.city,
> sum(1) as theSum
> ,count(*) as theCount
> from "dsp.address_pg" r
> right join "adventureworks.stateprovince" c on "r.stateprovinceid" = "c.stateprovinceid"
> group by r.city
> order by r.city ;;
> {code}
> the second one is also correct (LEFT JOIN) but uses window function:
> {code:sql}
> select distinct city,
> sum(1) OVER (PARTITION BY city) as theSum
> ,count(*) OVER (PARTITION BY city) as theCount
> from "dsp.address_pg" r
> left join "adventureworks.stateprovince" c on "r.stateprovinceid" = "c.stateprovinceid"
> order by r.city ;;
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months
[JBoss JIRA] (TEIID-5285) Add high-level feature for redirection of updates
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5285?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5285:
---------------------------------------
You can. That somewhat simplifies things as it will be driven from the application metadata.
> Add high-level feature for redirection of updates
> -------------------------------------------------
>
> Key: TEIID-5285
> URL: https://issues.jboss.org/browse/TEIID-5285
> Project: Teiid
> Issue Type: Feature Request
> Components: Query Engine, Teiid Spring Boot
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 11.x
>
>
> In microservices testing it is desirable to test against production/live data but not commit any updates. We should offer a simple solution that can defined by extension metadata and enabled/disabled by a feature flag. We may need to make simplifying assumptions about the scope (per session, per application, etc.) and durability of the updates.
> Under the covers this will be achieved by using views, update triggers, and a store for the updates and when not enabled the expectation is that all operations should pass through. However the application will be limited to using Teiid SQL and will be required to use the Teiid or pg driver, or Teiid spring boot.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months