[JBoss JIRA] (TEIID-5563) Separate the Teiid WildFly distribution into their own repo or module
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5563?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5563:
---------------------------------------
Updated the pr with the removal of the javax.resource dependency from the core. It has now been pushed to each resource adapter and a new module teiid-resource-spi. I've checked the changes against java 8 and 11.
[~rareddy] [~van.halbert] Have a look at the pr and see what you think.
Possible issues:
any disagreement with the new module names
are you ok with using TranslatorException instead of ResourceException
This just leaves org.jboss.spec.javax.xml.ws as the only a dependency of teiid-api that could be refined out - or just replaced with the generic java equivalent.
> Separate the Teiid WildFly distribution into their own repo or module
> ---------------------------------------------------------------------
>
> Key: TEIID-5563
> URL: https://issues.jboss.org/browse/TEIID-5563
> Project: Teiid
> Issue Type: Task
> Components: Build/Kits, Integration Tests
> Affects Versions: 12.x
> Reporter: Van Halbert
> Assignee: Van Halbert
> Priority: Major
>
> With the different types of distributions now being built based on Teiid like
> * WildFly
> * Thorntail
> * SpringBoot
> * Embedded
> Having main `github.com/teiid` repo contain artifacts for WildFly distribution poses an unnecessary dependency burden on other distributions. For example, the resource adapters are mainly for use with WildFly and Thorntail V2. They can still be applicable to embedded and SpringBoot as either non-managed connection factories, or require the user to provide appropriate management / pooling. When they are pulled into environments like SpringBoot they will bring several wildfly dependencies / and JEE constructs that are unnecessary - specifically the dependencies jboss-jaxws-api (teiid-api), javax.activation (teiid-core), jboss-transaction-api (teiid-api), and jboss-connector-api (teiid-api).
> This proposal is to separate "teiid" core modules along with all translators into one repository and move all the resource adapters along with any feature-packs and module building into a sperate repository like "teiid-wildfly". With the goal of providing similar connectivity in SpringBoot using as much common logic from SpringBoot (Spring Data in particular) and even Fuse as possible.
> Basically, when finished, the core Teiid modules only provide Maven artifacts along with their clean pom.xml with for direct and maybe transitive dependencies. None of the WildFly based modules support will be here. At worst this may introduce duplicate dependencies into the WildFly environment as we will need to manage all core / translator dependencies independently from those provided by WildFly. Where possible the teiid-api / core modules will need to use the generic javax dependency - or even remove the dependency if possible.
> The "teiid-wildfly" module on the other hand, will exactly preserve what is in the current repo as far feature packs and module building and overall WildFly distribution building.
> A follow-on task we can task we can look into is, converting the main teiid then to use basepom rather than the jboss-parent pom. However, the recommendation is this should be done after, not simultaneously.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 3 months
[JBoss JIRA] (TEIID-5572) FileExecutionFactory fails with ftp source
by Steven Hawkins (Jira)
Steven Hawkins created TEIID-5572:
-------------------------------------
Summary: FileExecutionFactory fails with ftp source
Key: TEIID-5572
URL: https://issues.jboss.org/browse/TEIID-5572
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 11.1.2, 12.0, 11.2.2
The virtualfileconnection logic does not correctly handle the files array - getfiles will always result in an indexoutofbounds exceptions.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 3 months
[JBoss JIRA] (TEIID-5563) Separate the Teiid WildFly distribution into their own repo or module
by Ramesh Reddy (Jira)
[ https://issues.jboss.org/browse/TEIID-5563?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-5563:
-------------------------------------
TEIID-5066 is one I logged for the connection/ConnectionFactory work. I think we can separate teiid-wildfly module work and that as two separate tasks. I started a branch on this a while ago but quickly got blocked by my thinking to pull out a common connection factory for managing the properties for connection management. I do think, that is difficult to solve across different runtimes, and also sometimes we have no control over it as in teiid-komodo/syndesis combination. We can leave that to be distribution specific.
> Separate the Teiid WildFly distribution into their own repo or module
> ---------------------------------------------------------------------
>
> Key: TEIID-5563
> URL: https://issues.jboss.org/browse/TEIID-5563
> Project: Teiid
> Issue Type: Task
> Components: Build/Kits, Integration Tests
> Affects Versions: 12.x
> Reporter: Van Halbert
> Assignee: Van Halbert
> Priority: Major
>
> With the different types of distributions now being built based on Teiid like
> * WildFly
> * Thorntail
> * SpringBoot
> * Embedded
> Having main `github.com/teiid` repo contain artifacts for WildFly distribution poses an unnecessary dependency burden on other distributions. For example, the resource adapters are mainly for use with WildFly and Thorntail V2. They can still be applicable to embedded and SpringBoot as either non-managed connection factories, or require the user to provide appropriate management / pooling. When they are pulled into environments like SpringBoot they will bring several wildfly dependencies / and JEE constructs that are unnecessary - specifically the dependencies jboss-jaxws-api (teiid-api), javax.activation (teiid-core), jboss-transaction-api (teiid-api), and jboss-connector-api (teiid-api).
> This proposal is to separate "teiid" core modules along with all translators into one repository and move all the resource adapters along with any feature-packs and module building into a sperate repository like "teiid-wildfly". With the goal of providing similar connectivity in SpringBoot using as much common logic from SpringBoot (Spring Data in particular) and even Fuse as possible.
> Basically, when finished, the core Teiid modules only provide Maven artifacts along with their clean pom.xml with for direct and maybe transitive dependencies. None of the WildFly based modules support will be here. At worst this may introduce duplicate dependencies into the WildFly environment as we will need to manage all core / translator dependencies independently from those provided by WildFly. Where possible the teiid-api / core modules will need to use the generic javax dependency - or even remove the dependency if possible.
> The "teiid-wildfly" module on the other hand, will exactly preserve what is in the current repo as far feature packs and module building and overall WildFly distribution building.
> A follow-on task we can task we can look into is, converting the main teiid then to use basepom rather than the jboss-parent pom. However, the recommendation is this should be done after, not simultaneously.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 3 months
[JBoss JIRA] (TEIID-5563) Separate the Teiid WildFly distribution into their own repo or module
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5563?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5563:
---------------------------------------
javax.activation - used by InputStreamFactory and an engine convention with translator logic (OData, Swagger, Webservice). 60-70k for the dependency. This is a low priority to remove.
For jboss-transaction-api and jboss-connector-api we can split out the org.teiid.resource.spi - but are still left with a few references:
ExecutionFactory has some built-in handling of javax.resource.Connection/ConnectionFactory.
FileConnection and WSConnection extend javax.resource.Connection - actually all of our "Connection" interfaces do this though. It should be fine to just strip this off as their implementation classes via BasicConnection are already required to implement javax.resource.Connection.
> Separate the Teiid WildFly distribution into their own repo or module
> ---------------------------------------------------------------------
>
> Key: TEIID-5563
> URL: https://issues.jboss.org/browse/TEIID-5563
> Project: Teiid
> Issue Type: Task
> Components: Build/Kits, Integration Tests
> Affects Versions: 12.x
> Reporter: Van Halbert
> Assignee: Van Halbert
> Priority: Major
>
> With the different types of distributions now being built based on Teiid like
> * WildFly
> * Thorntail
> * SpringBoot
> * Embedded
> Having main `github.com/teiid` repo contain artifacts for WildFly distribution poses an unnecessary dependency burden on other distributions. For example, the resource adapters are mainly for use with WildFly and Thorntail V2. They can still be applicable to embedded and SpringBoot as either non-managed connection factories, or require the user to provide appropriate management / pooling. When they are pulled into environments like SpringBoot they will bring several wildfly dependencies / and JEE constructs that are unnecessary - specifically the dependencies jboss-jaxws-api (teiid-api), javax.activation (teiid-core), jboss-transaction-api (teiid-api), and jboss-connector-api (teiid-api).
> This proposal is to separate "teiid" core modules along with all translators into one repository and move all the resource adapters along with any feature-packs and module building into a sperate repository like "teiid-wildfly". With the goal of providing similar connectivity in SpringBoot using as much common logic from SpringBoot (Spring Data in particular) and even Fuse as possible.
> Basically, when finished, the core Teiid modules only provide Maven artifacts along with their clean pom.xml with for direct and maybe transitive dependencies. None of the WildFly based modules support will be here. At worst this may introduce duplicate dependencies into the WildFly environment as we will need to manage all core / translator dependencies independently from those provided by WildFly. Where possible the teiid-api / core modules will need to use the generic javax dependency - or even remove the dependency if possible.
> The "teiid-wildfly" module on the other hand, will exactly preserve what is in the current repo as far feature packs and module building and overall WildFly distribution building.
> A follow-on task we can task we can look into is, converting the main teiid then to use basepom rather than the jboss-parent pom. However, the recommendation is this should be done after, not simultaneously.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 3 months
[JBoss JIRA] (TEIID-4498) Generalize subquery batch processing
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-4498?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4498:
---------------------------------------
The initial commit expanded the handling of the select clause to later in planning - for a limited subset of queries, we can use a left outer join plan instead.
The next commit expanded handling further to new scalar subquery cases and the initial handling of possible multi-row cases for scalar subqueries. Unfortunately we don't yet handle composite keys.
The final commit will further generalize the multi-row case.
> Generalize subquery batch processing
> ------------------------------------
>
> Key: TEIID-4498
> URL: https://issues.jboss.org/browse/TEIID-4498
> Project: Teiid
> Issue Type: Enhancement
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.0
>
>
> For subqueries that cannot be unnested, but can be modified to project their correlation, we should have at least batch processing rather than the row by row default.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 3 months
[JBoss JIRA] (TEIID-5571) If set null as argument to replace function, the column of all records becomes null
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5571?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5571.
-----------------------------------
Resolution: Rejected
Most sql functions have null on null behavior - that is if any argument is null, then the result is null. You can confirm this behavior with postgresql as well - issue select replace('a', 'b', null)
> If set null as argument to replace function, the column of all records becomes null
> -----------------------------------------------------------------------------------
>
> Key: TEIID-5571
> URL: https://issues.jboss.org/browse/TEIID-5571
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.16.6_4
> Environment: jdv6.4.5
> Reporter: Hiroki Daicho
> Assignee: Steven Hawkins
> Priority: Major
> Attachments: Client.java, logs.zip, oraclevdb-vdb.xml
>
>
> When argument of replace function set to null, all records of the column are set null value.
> - Query
> select num, replace(name, 'a', null) from TEST01
> Results
> 1: 0, null
> 2: 1, null
> 3: 2, null
> 4: 3, null
> Results (Expected)
> 1: 0, null
> 2: 1, b
> 3: 2, c
> 4: 3, d
> {code}
> 14:03:17,019 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) MH/yC1t35aMa START USER COMMAND: startTime=2018-12-13 14:03:17.019 requestID=MH/yC1t35aMa.0 txID=null sessionID=MH/yC1t35aMa applicationName=JDBC principal=teiidUser@teiid-security vdbName=oraclevdb vdbVersion=1 sql=select num, replace(name, 'a', null) from TEST01
> 14:03:17,309 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue1) MH/yC1t35aMa START DATA SRC COMMAND: startTime=2018-12-13 14:03:17.309 requestID=MH/yC1t35aMa.0 sourceCommandID=0 executionID=0 txID=null modelName=oracle translatorName=oracle sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security sql=SELECT g_0.NUM FROM oracle.TEST01 AS g_0
> 14:03:17,314 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue1) MH/yC1t35aMa SOURCE SRC COMMAND: endTime=2018-12-13 14:03:17.314 requestID=MH/yC1t35aMa.0 sourceCommandID=0 executionID=0 txID=null modelName=oracle translatorName=oracle sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security sourceCommand=[SELECT g_0."NUM" FROM "TESTDB"."TEST01" g_0]
> 14:03:17,440 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue2) MH/yC1t35aMa END SRC COMMAND: endTime=2018-12-13 14:03:17.44 requestID=MH/yC1t35aMa.0 sourceCommandID=0 executionID=0 txID=null modelName=oracle translatorName=oracle sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security finalRowCount=4 cpuTime(ns)=121768769
> 14:03:17,481 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue3) MH/yC1t35aMa END USER COMMAND: endTime=2018-12-13 14:03:17.481 requestID=MH/yC1t35aMa.0 txID=null sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security vdbName=oraclevdb vdbVersion=1 finalRowCount=4
> {code}
> This query is also same result.
> select num, replace(name, null, 'a') from TEST01
> When the replace function is in view model as follows, the result is same as the above.
> {code}
> <model name="oracle_view" type="VIRTUAL">
> <property name="imports" value="oracle"/>
> <metadata type="DDL"><![CDATA[
> CREATE VIEW V_TEST01 (
> NUM bigdecimal(38) NOT NULL OPTIONS(NAMEINSOURCE '"NUM"', NATIVE_TYPE 'NUMBER', UPDATABLE 'FALSE', FIXED_LENGTH 'TRUE'),
> NAME string(20) OPTIONS(NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR2', UPDATABLE 'FALSE'),
> CONSTRAINT PK_NUM PRIMARY KEY(NUM) OPTIONS(NAMEINSOURCE '"PK_NUM"')
> ) OPTIONS(NAMEINSOURCE '"TESTDB"."TEST01"')
> AS
> SELECT
> t.NUM, replace(t.NAME, 'a', null) AS name
> FROM
> oracle.TEST01 AS t;
> ]]></metadata>
> </model>
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 3 months
[JBoss JIRA] (TEIID-5571) If set null as argument to replace function, the column of all records becomes null
by Hiroki Daicho (Jira)
[ https://issues.jboss.org/browse/TEIID-5571?page=com.atlassian.jira.plugin... ]
Hiroki Daicho updated TEIID-5571:
---------------------------------
Description:
When argument of replace function set to null, all records of the column are set null value.
- Query
select num, replace(name, 'a', null) from TEST01
Results
1: 0, null
2: 1, null
3: 2, null
4: 3, null
Results (Expected)
1: 0, null
2: 1, b
3: 2, c
4: 3, d
{code}
14:03:17,019 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) MH/yC1t35aMa START USER COMMAND: startTime=2018-12-13 14:03:17.019 requestID=MH/yC1t35aMa.0 txID=null sessionID=MH/yC1t35aMa applicationName=JDBC principal=teiidUser@teiid-security vdbName=oraclevdb vdbVersion=1 sql=select num, replace(name, 'a', null) from TEST01
14:03:17,309 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue1) MH/yC1t35aMa START DATA SRC COMMAND: startTime=2018-12-13 14:03:17.309 requestID=MH/yC1t35aMa.0 sourceCommandID=0 executionID=0 txID=null modelName=oracle translatorName=oracle sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security sql=SELECT g_0.NUM FROM oracle.TEST01 AS g_0
14:03:17,314 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue1) MH/yC1t35aMa SOURCE SRC COMMAND: endTime=2018-12-13 14:03:17.314 requestID=MH/yC1t35aMa.0 sourceCommandID=0 executionID=0 txID=null modelName=oracle translatorName=oracle sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security sourceCommand=[SELECT g_0."NUM" FROM "TESTDB"."TEST01" g_0]
14:03:17,440 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue2) MH/yC1t35aMa END SRC COMMAND: endTime=2018-12-13 14:03:17.44 requestID=MH/yC1t35aMa.0 sourceCommandID=0 executionID=0 txID=null modelName=oracle translatorName=oracle sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security finalRowCount=4 cpuTime(ns)=121768769
14:03:17,481 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue3) MH/yC1t35aMa END USER COMMAND: endTime=2018-12-13 14:03:17.481 requestID=MH/yC1t35aMa.0 txID=null sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security vdbName=oraclevdb vdbVersion=1 finalRowCount=4
{code}
This query is also same result.
select num, replace(name, null, 'a') from TEST01
When the replace function is in view model as follows, the result is same as the above.
{code}
<model name="oracle_view" type="VIRTUAL">
<property name="imports" value="oracle"/>
<metadata type="DDL"><![CDATA[
CREATE VIEW V_TEST01 (
NUM bigdecimal(38) NOT NULL OPTIONS(NAMEINSOURCE '"NUM"', NATIVE_TYPE 'NUMBER', UPDATABLE 'FALSE', FIXED_LENGTH 'TRUE'),
NAME string(20) OPTIONS(NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR2', UPDATABLE 'FALSE'),
CONSTRAINT PK_NUM PRIMARY KEY(NUM) OPTIONS(NAMEINSOURCE '"PK_NUM"')
) OPTIONS(NAMEINSOURCE '"TESTDB"."TEST01"')
AS
SELECT
t.NUM, replace(t.NAME, 'a', null) AS name
FROM
oracle.TEST01 AS t;
]]></metadata>
</model>
{code}
was:
When argument of replace fucntion set to null, all records of the column are set null value.
- Query
select num, replace(name, 'a', null) from TEST01
- Results
1: 0,null
2: 1,null
3: 2,null
4: 3,null
{code}
14:03:17,019 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) MH/yC1t35aMa START USER COMMAND: startTime=2018-12-13 14:03:17.019 requestID=MH/yC1t35aMa.0 txID=null sessionID=MH/yC1t35aMa applicationName=JDBC principal=teiidUser@teiid-security vdbName=oraclevdb vdbVersion=1 sql=select num, replace(name, 'a', null) from TEST01
14:03:17,309 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue1) MH/yC1t35aMa START DATA SRC COMMAND: startTime=2018-12-13 14:03:17.309 requestID=MH/yC1t35aMa.0 sourceCommandID=0 executionID=0 txID=null modelName=oracle translatorName=oracle sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security sql=SELECT g_0.NUM FROM oracle.TEST01 AS g_0
14:03:17,314 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue1) MH/yC1t35aMa SOURCE SRC COMMAND: endTime=2018-12-13 14:03:17.314 requestID=MH/yC1t35aMa.0 sourceCommandID=0 executionID=0 txID=null modelName=oracle translatorName=oracle sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security sourceCommand=[SELECT g_0."NUM" FROM "TESTDB"."TEST01" g_0]
14:03:17,440 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue2) MH/yC1t35aMa END SRC COMMAND: endTime=2018-12-13 14:03:17.44 requestID=MH/yC1t35aMa.0 sourceCommandID=0 executionID=0 txID=null modelName=oracle translatorName=oracle sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security finalRowCount=4 cpuTime(ns)=121768769
14:03:17,481 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue3) MH/yC1t35aMa END USER COMMAND: endTime=2018-12-13 14:03:17.481 requestID=MH/yC1t35aMa.0 txID=null sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security vdbName=oraclevdb vdbVersion=1 finalRowCount=4
{code}
This query is also same result.
select num, replace(name, null, 'a) from TEST01
When the replace function is in view model as follows, the result is same as the above.
{code}
<model name="oracle_view" type="VIRTUAL">
<property name="imports" value="oracle"/>
<metadata type="DDL"><![CDATA[
CREATE VIEW V_TEST01 (
NUM bigdecimal(38) NOT NULL OPTIONS(NAMEINSOURCE '"NUM"', NATIVE_TYPE 'NUMBER', UPDATABLE 'FALSE', FIXED_LENGTH 'TRUE'),
NAME string(20) OPTIONS(NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR2', UPDATABLE 'FALSE'),
CONSTRAINT PK_NUM PRIMARY KEY(NUM) OPTIONS(NAMEINSOURCE '"PK_NUM"')
) OPTIONS(NAMEINSOURCE '"TESTDB"."TEST01"')
AS
SELECT
t.NUM, replace(t.NAME, 'a', null) AS name
FROM
oracle.TEST01 AS t;
]]></metadata>
</model>
{code}
> If set null as argument to replace function, the column of all records becomes null
> -----------------------------------------------------------------------------------
>
> Key: TEIID-5571
> URL: https://issues.jboss.org/browse/TEIID-5571
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.16.6_4
> Environment: jdv6.4.5
> Reporter: Hiroki Daicho
> Assignee: Steven Hawkins
> Priority: Major
> Attachments: Client.java, logs.zip, oraclevdb-vdb.xml
>
>
> When argument of replace function set to null, all records of the column are set null value.
> - Query
> select num, replace(name, 'a', null) from TEST01
> Results
> 1: 0, null
> 2: 1, null
> 3: 2, null
> 4: 3, null
> Results (Expected)
> 1: 0, null
> 2: 1, b
> 3: 2, c
> 4: 3, d
> {code}
> 14:03:17,019 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) MH/yC1t35aMa START USER COMMAND: startTime=2018-12-13 14:03:17.019 requestID=MH/yC1t35aMa.0 txID=null sessionID=MH/yC1t35aMa applicationName=JDBC principal=teiidUser@teiid-security vdbName=oraclevdb vdbVersion=1 sql=select num, replace(name, 'a', null) from TEST01
> 14:03:17,309 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue1) MH/yC1t35aMa START DATA SRC COMMAND: startTime=2018-12-13 14:03:17.309 requestID=MH/yC1t35aMa.0 sourceCommandID=0 executionID=0 txID=null modelName=oracle translatorName=oracle sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security sql=SELECT g_0.NUM FROM oracle.TEST01 AS g_0
> 14:03:17,314 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue1) MH/yC1t35aMa SOURCE SRC COMMAND: endTime=2018-12-13 14:03:17.314 requestID=MH/yC1t35aMa.0 sourceCommandID=0 executionID=0 txID=null modelName=oracle translatorName=oracle sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security sourceCommand=[SELECT g_0."NUM" FROM "TESTDB"."TEST01" g_0]
> 14:03:17,440 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue2) MH/yC1t35aMa END SRC COMMAND: endTime=2018-12-13 14:03:17.44 requestID=MH/yC1t35aMa.0 sourceCommandID=0 executionID=0 txID=null modelName=oracle translatorName=oracle sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security finalRowCount=4 cpuTime(ns)=121768769
> 14:03:17,481 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue3) MH/yC1t35aMa END USER COMMAND: endTime=2018-12-13 14:03:17.481 requestID=MH/yC1t35aMa.0 txID=null sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security vdbName=oraclevdb vdbVersion=1 finalRowCount=4
> {code}
> This query is also same result.
> select num, replace(name, null, 'a') from TEST01
> When the replace function is in view model as follows, the result is same as the above.
> {code}
> <model name="oracle_view" type="VIRTUAL">
> <property name="imports" value="oracle"/>
> <metadata type="DDL"><![CDATA[
> CREATE VIEW V_TEST01 (
> NUM bigdecimal(38) NOT NULL OPTIONS(NAMEINSOURCE '"NUM"', NATIVE_TYPE 'NUMBER', UPDATABLE 'FALSE', FIXED_LENGTH 'TRUE'),
> NAME string(20) OPTIONS(NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR2', UPDATABLE 'FALSE'),
> CONSTRAINT PK_NUM PRIMARY KEY(NUM) OPTIONS(NAMEINSOURCE '"PK_NUM"')
> ) OPTIONS(NAMEINSOURCE '"TESTDB"."TEST01"')
> AS
> SELECT
> t.NUM, replace(t.NAME, 'a', null) AS name
> FROM
> oracle.TEST01 AS t;
> ]]></metadata>
> </model>
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 3 months
[JBoss JIRA] (TEIID-5571) If set null as argument to replace function, the column of all records becomes null
by Hiroki Daicho (Jira)
[ https://issues.jboss.org/browse/TEIID-5571?page=com.atlassian.jira.plugin... ]
Hiroki Daicho edited comment on TEIID-5571 at 12/13/18 2:24 AM:
----------------------------------------------------------------
It seems QueryRewriter#rewriteExpressions() removes the column from query.
was (Author: hiroki.daicho):
It seems QueryRewriter#rewriteExpressions() removes the column from query.
Is there any workaround for this?
> If set null as argument to replace function, the column of all records becomes null
> -----------------------------------------------------------------------------------
>
> Key: TEIID-5571
> URL: https://issues.jboss.org/browse/TEIID-5571
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.16.6_4
> Environment: jdv6.4.5
> Reporter: Hiroki Daicho
> Assignee: Steven Hawkins
> Priority: Major
> Attachments: Client.java, logs.zip, oraclevdb-vdb.xml
>
>
> When argument of replace fucntion set to null, all records of the column are set null value.
> - Query
> select num, replace(name, 'a', null) from TEST01
> - Results
> 1: 0,null
> 2: 1,null
> 3: 2,null
> 4: 3,null
> {code}
> 14:03:17,019 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) MH/yC1t35aMa START USER COMMAND: startTime=2018-12-13 14:03:17.019 requestID=MH/yC1t35aMa.0 txID=null sessionID=MH/yC1t35aMa applicationName=JDBC principal=teiidUser@teiid-security vdbName=oraclevdb vdbVersion=1 sql=select num, replace(name, 'a', null) from TEST01
> 14:03:17,309 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue1) MH/yC1t35aMa START DATA SRC COMMAND: startTime=2018-12-13 14:03:17.309 requestID=MH/yC1t35aMa.0 sourceCommandID=0 executionID=0 txID=null modelName=oracle translatorName=oracle sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security sql=SELECT g_0.NUM FROM oracle.TEST01 AS g_0
> 14:03:17,314 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue1) MH/yC1t35aMa SOURCE SRC COMMAND: endTime=2018-12-13 14:03:17.314 requestID=MH/yC1t35aMa.0 sourceCommandID=0 executionID=0 txID=null modelName=oracle translatorName=oracle sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security sourceCommand=[SELECT g_0."NUM" FROM "TESTDB"."TEST01" g_0]
> 14:03:17,440 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue2) MH/yC1t35aMa END SRC COMMAND: endTime=2018-12-13 14:03:17.44 requestID=MH/yC1t35aMa.0 sourceCommandID=0 executionID=0 txID=null modelName=oracle translatorName=oracle sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security finalRowCount=4 cpuTime(ns)=121768769
> 14:03:17,481 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue3) MH/yC1t35aMa END USER COMMAND: endTime=2018-12-13 14:03:17.481 requestID=MH/yC1t35aMa.0 txID=null sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security vdbName=oraclevdb vdbVersion=1 finalRowCount=4
> {code}
> This query is also same result.
> select num, replace(name, null, 'a) from TEST01
> When the replace function is in view model as follows, the result is same as the above.
> {code}
> <model name="oracle_view" type="VIRTUAL">
> <property name="imports" value="oracle"/>
> <metadata type="DDL"><![CDATA[
> CREATE VIEW V_TEST01 (
> NUM bigdecimal(38) NOT NULL OPTIONS(NAMEINSOURCE '"NUM"', NATIVE_TYPE 'NUMBER', UPDATABLE 'FALSE', FIXED_LENGTH 'TRUE'),
> NAME string(20) OPTIONS(NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR2', UPDATABLE 'FALSE'),
> CONSTRAINT PK_NUM PRIMARY KEY(NUM) OPTIONS(NAMEINSOURCE '"PK_NUM"')
> ) OPTIONS(NAMEINSOURCE '"TESTDB"."TEST01"')
> AS
> SELECT
> t.NUM, replace(t.NAME, 'a', null) AS name
> FROM
> oracle.TEST01 AS t;
> ]]></metadata>
> </model>
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 3 months
[JBoss JIRA] (TEIID-5571) If set null as argument to replace function, the column of all records becomes null
by Hiroki Daicho (Jira)
[ https://issues.jboss.org/browse/TEIID-5571?page=com.atlassian.jira.plugin... ]
Hiroki Daicho commented on TEIID-5571:
--------------------------------------
It seems QueryRewriter#rewriteExpressions() removes the column from query.
Is there any workaround for this?
> If set null as argument to replace function, the column of all records becomes null
> -----------------------------------------------------------------------------------
>
> Key: TEIID-5571
> URL: https://issues.jboss.org/browse/TEIID-5571
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.16.6_4
> Environment: jdv6.4.5
> Reporter: Hiroki Daicho
> Assignee: Steven Hawkins
> Priority: Major
> Attachments: Client.java, logs.zip, oraclevdb-vdb.xml
>
>
> When argument of replace fucntion set to null, all records of the column are set null value.
> - Query
> select num, replace(name, 'a', null) from TEST01
> - Results
> 1: 0,null
> 2: 1,null
> 3: 2,null
> 4: 3,null
> {code}
> 14:03:17,019 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) MH/yC1t35aMa START USER COMMAND: startTime=2018-12-13 14:03:17.019 requestID=MH/yC1t35aMa.0 txID=null sessionID=MH/yC1t35aMa applicationName=JDBC principal=teiidUser@teiid-security vdbName=oraclevdb vdbVersion=1 sql=select num, replace(name, 'a', null) from TEST01
> 14:03:17,309 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue1) MH/yC1t35aMa START DATA SRC COMMAND: startTime=2018-12-13 14:03:17.309 requestID=MH/yC1t35aMa.0 sourceCommandID=0 executionID=0 txID=null modelName=oracle translatorName=oracle sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security sql=SELECT g_0.NUM FROM oracle.TEST01 AS g_0
> 14:03:17,314 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue1) MH/yC1t35aMa SOURCE SRC COMMAND: endTime=2018-12-13 14:03:17.314 requestID=MH/yC1t35aMa.0 sourceCommandID=0 executionID=0 txID=null modelName=oracle translatorName=oracle sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security sourceCommand=[SELECT g_0."NUM" FROM "TESTDB"."TEST01" g_0]
> 14:03:17,440 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue2) MH/yC1t35aMa END SRC COMMAND: endTime=2018-12-13 14:03:17.44 requestID=MH/yC1t35aMa.0 sourceCommandID=0 executionID=0 txID=null modelName=oracle translatorName=oracle sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security finalRowCount=4 cpuTime(ns)=121768769
> 14:03:17,481 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue3) MH/yC1t35aMa END USER COMMAND: endTime=2018-12-13 14:03:17.481 requestID=MH/yC1t35aMa.0 txID=null sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security vdbName=oraclevdb vdbVersion=1 finalRowCount=4
> {code}
> This query is also same result.
> select num, replace(name, null, 'a) from TEST01
> When the replace function is in view model as follows, the result is same as the above.
> {code}
> <model name="oracle_view" type="VIRTUAL">
> <property name="imports" value="oracle"/>
> <metadata type="DDL"><![CDATA[
> CREATE VIEW V_TEST01 (
> NUM bigdecimal(38) NOT NULL OPTIONS(NAMEINSOURCE '"NUM"', NATIVE_TYPE 'NUMBER', UPDATABLE 'FALSE', FIXED_LENGTH 'TRUE'),
> NAME string(20) OPTIONS(NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR2', UPDATABLE 'FALSE'),
> CONSTRAINT PK_NUM PRIMARY KEY(NUM) OPTIONS(NAMEINSOURCE '"PK_NUM"')
> ) OPTIONS(NAMEINSOURCE '"TESTDB"."TEST01"')
> AS
> SELECT
> t.NUM, replace(t.NAME, 'a', null) AS name
> FROM
> oracle.TEST01 AS t;
> ]]></metadata>
> </model>
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 3 months
[JBoss JIRA] (TEIID-5571) If set null as argument to replace function, the column of all records becomes null
by Hiroki Daicho (Jira)
Hiroki Daicho created TEIID-5571:
------------------------------------
Summary: If set null as argument to replace function, the column of all records becomes null
Key: TEIID-5571
URL: https://issues.jboss.org/browse/TEIID-5571
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 8.12.16.6_4
Environment: jdv6.4.5
Reporter: Hiroki Daicho
Assignee: Steven Hawkins
Attachments: Client.java, logs.zip, oraclevdb-vdb.xml
When argument of replace fucntion set to null, all records of the column are set null value.
- Query
select num, replace(name, 'a', null) from TEST01
- Results
1: 0,null
2: 1,null
3: 2,null
4: 3,null
{code}
14:03:17,019 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) MH/yC1t35aMa START USER COMMAND: startTime=2018-12-13 14:03:17.019 requestID=MH/yC1t35aMa.0 txID=null sessionID=MH/yC1t35aMa applicationName=JDBC principal=teiidUser@teiid-security vdbName=oraclevdb vdbVersion=1 sql=select num, replace(name, 'a', null) from TEST01
14:03:17,309 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue1) MH/yC1t35aMa START DATA SRC COMMAND: startTime=2018-12-13 14:03:17.309 requestID=MH/yC1t35aMa.0 sourceCommandID=0 executionID=0 txID=null modelName=oracle translatorName=oracle sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security sql=SELECT g_0.NUM FROM oracle.TEST01 AS g_0
14:03:17,314 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue1) MH/yC1t35aMa SOURCE SRC COMMAND: endTime=2018-12-13 14:03:17.314 requestID=MH/yC1t35aMa.0 sourceCommandID=0 executionID=0 txID=null modelName=oracle translatorName=oracle sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security sourceCommand=[SELECT g_0."NUM" FROM "TESTDB"."TEST01" g_0]
14:03:17,440 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue2) MH/yC1t35aMa END SRC COMMAND: endTime=2018-12-13 14:03:17.44 requestID=MH/yC1t35aMa.0 sourceCommandID=0 executionID=0 txID=null modelName=oracle translatorName=oracle sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security finalRowCount=4 cpuTime(ns)=121768769
14:03:17,481 INFO [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue3) MH/yC1t35aMa END USER COMMAND: endTime=2018-12-13 14:03:17.481 requestID=MH/yC1t35aMa.0 txID=null sessionID=MH/yC1t35aMa principal=teiidUser@teiid-security vdbName=oraclevdb vdbVersion=1 finalRowCount=4
{code}
This query is also same result.
select num, replace(name, null, 'a) from TEST01
When the replace function is in view model as follows, the result is same as the above.
{code}
<model name="oracle_view" type="VIRTUAL">
<property name="imports" value="oracle"/>
<metadata type="DDL"><![CDATA[
CREATE VIEW V_TEST01 (
NUM bigdecimal(38) NOT NULL OPTIONS(NAMEINSOURCE '"NUM"', NATIVE_TYPE 'NUMBER', UPDATABLE 'FALSE', FIXED_LENGTH 'TRUE'),
NAME string(20) OPTIONS(NAMEINSOURCE '"NAME"', NATIVE_TYPE 'VARCHAR2', UPDATABLE 'FALSE'),
CONSTRAINT PK_NUM PRIMARY KEY(NUM) OPTIONS(NAMEINSOURCE '"PK_NUM"')
) OPTIONS(NAMEINSOURCE '"TESTDB"."TEST01"')
AS
SELECT
t.NUM, replace(t.NAME, 'a', null) AS name
FROM
oracle.TEST01 AS t;
]]></metadata>
</model>
{code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 3 months