[JBoss JIRA] (TEIID-2202) Incorrect aggregate rewriting on DB2/AS400 using UDF
by Hisanobu Okuda (JIRA)
Hisanobu Okuda created TEIID-2202:
-------------------------------------
Summary: Incorrect aggregate rewriting on DB2/AS400 using UDF
Key: TEIID-2202
URL: https://issues.jboss.org/browse/TEIID-2202
Project: Teiid
Issue Type: Bug
Components: JDBC Connector, Query Engine
Affects Versions: 7.7.1
Reporter: Hisanobu Okuda
Assignee: Steven Hawkins
When I run the following query, the count(*) in the middle inline view, gets rewritten as a sum and a count in the most inner inline view. This has something to do with my the parseDate_ UDF. This is a change from EDS 5.2 where it worked correctly. I've included logs from both for contrast.
Query:
SELECT
examiner,
exam_date,
exam_date_code,
num_claims,
company_id,
1 AS enterprise_id
FROM
(
SELECT
examiner,
parseDate_(exam_date_code) AS exam_date,
exam_date_code,
company_id,
COUNT(*) AS num_claims
FROM
(
SELECT
CASE
WHEN (ME4.ADJUSR <> ' ')
AND (ME4.APRUSR <> ' ')
THEN
CASE
WHEN ME4.APRDAT >= ME4.ADJDAT
THEN ME4.APRUSR
ELSE ME4.ADJUSR
END
WHEN (ME4.APRUSR <> ' ')
AND (ME4.ADJUSR = ' ')
THEN ME4.APRUSR
WHEN (ME4.APRUSR = ' ')
AND (ME4.ADJUSR <> ' ')
THEN ME4.ADJUSR
ELSE MED.ADJUSR
END AS examiner,
CASE
WHEN (ME4.ADJUSR <> ' ')
AND (ME4.APRUSR <> ' ')
THEN
CASE
WHEN ME4.APRDAT >= ME4.ADJDAT
THEN ME4.APRDAT
ELSE ME4.ADJDAT
END
WHEN (ME4.APRUSR <> ' ')
AND (ME4.ADJUSR = ' ')
THEN ME4.APRDAT
WHEN (ME4.APRUSR = ' ')
AND (ME4.ADJUSR <> ' ')
THEN ME4.ADJDAT
ELSE MED.LSTCHG
END AS exam_date_code,
CONVERT(MED.COMPNO, INTEGER) AS company_id
FROM
FCC.MEDMAS AS MED
INNER JOIN
FCC.ME4MAS AS ME4
ON
MED.BRANCD = ME4.BRANCD
AND MED.BATDAT = ME4.BATDAT
AND MED.BATSEQ = ME4.BATSEQ
AND MED.SEQNUM = ME4.SEQNUM
WHERE
(MED.SYSDAT >= curdate_('-11 months 1st day'))
AND (MED.LINENO = 1)
AND (MED.STATCD <> 'O')
AND ((ME4.ADJUSR <> ' ')
OR (ME4.APRUSR <> ' ')
OR (MED.ADJUSR <> ' '))) AS Event
GROUP BY
Event.examiner,
Event.exam_date_code,
Event.company_id) AS Count_By_Examiner_ID
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[JBoss JIRA] (TEIID-2177) Expand native-query support
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-2177:
-------------------------------------
Summary: Expand native-query support
Key: TEIID-2177
URL: https://issues.jboss.org/browse/TEIID-2177
Project: Teiid
Issue Type: Sub-task
Components: Misc. Connectors
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 8.2
The native-query extension metadata is currently understood only by jdbc. We should add support in olap, ldap, salesforce, etc.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[JBoss JIRA] (TEIID-2176) Expose invoke procedures for querable sources
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-2176:
-------------------------------------
Summary: Expose invoke procedures for querable sources
Key: TEIID-2176
URL: https://issues.jboss.org/browse/TEIID-2176
Project: Teiid
Issue Type: Sub-task
Components: Misc. Connectors
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 8.2
We should add procedures similar to invokeMDX that allow native query execution. This would compliment the canned native-query feature to allow fully dynamic query execution.
TEIID-2111 will also provide vararg capabilities should we need it.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[JBoss JIRA] (TEIID-2231) Prodive a way to implement ddl preprocessors
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2231?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-2231.
-----------------------------------
Resolution: Done
Added a parse(Reader) call on the MetadataFactory. We could restrict the implementation if needed, but for now I've added a org.teiid.metadata.Parser and ParseException to encapsulate calls into the engine parser. This gets set on the MetadataFactory before being passed into a MetadataRepository.
> Prodive a way to implement ddl preprocessors
> --------------------------------------------
>
> Key: TEIID-2231
> URL: https://issues.jboss.org/browse/TEIID-2231
> Project: Teiid
> Issue Type: Enhancement
> Components: Connector API
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 8.2
>
>
> A common pattern is to use ddl that needs preprocessing before it is valid Teiid sql. However the MetadataFactory does not expose a way to either set a Reader to pass the ddl to the chained MetadataRepository nor does it directly expose a parse method backed by the parser (which would need injected).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months
[JBoss JIRA] (TEIID-2218) Exception Executing WS Query via View
by Ted Jones (JIRA)
Ted Jones created TEIID-2218:
--------------------------------
Summary: Exception Executing WS Query via View
Key: TEIID-2218
URL: https://issues.jboss.org/browse/TEIID-2218
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 8.2
Reporter: Ted Jones
Assignee: Steven Hawkins
Using Teiid 8.2 Alpha1 on Openshift, I encounter the following exception querying a view with a web service as a source:
2012/09/17 11:41:09,541 ERROR [org.teiid.PROCESSOR] (http-127.8.133.129/127.8.133.129:8080-2) TEIID30019 Unexpected exception for request mRknOBSXBt1k.10: org.teiid.core.TeiidRuntimeException: Alread closed
at org.teiid.query.processor.relational.XMLTableNode$1.run(XMLTableNode.java:233)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:249)
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:123)
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:298)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_05-icedtea]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_05-icedtea]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_05-icedtea]
Caused by: java.lang.IllegalStateException: Alread closed
at org.teiid.common.buffer.FileStore$FileStoreOutputStream.checkOpen(FileStore.java:129)
at org.teiid.common.buffer.FileStore$FileStoreOutputStream.flushBuffer(FileStore.java:84)
at org.teiid.common.buffer.FileStore$FileStoreOutputStream.flush(FileStore.java:111)
at org.teiid.common.buffer.FileStore$FileStoreOutputStream.close(FileStore.java:117)
at org.teiid.dqp.internal.process.SaveOnReadInputStream.close(SaveOnReadInputStream.java:132)
at java.io.FilterInputStream.close(FilterInputStream.java:181) [rt.jar:1.7.0_05-icedtea]
at org.teiid.translator.WSConnection$Util.closeSource(WSConnection.java:64) [teiid-api-8.2.0.Alpha1-SNAPSHOT.jar:8.2.0.Alpha1-SNAPSHOT]
at org.teiid.query.xquery.saxon.SaxonXQueryExpression$Result.close(SaxonXQueryExpression.java:119)
at org.teiid.query.xquery.saxon.XQueryEvaluator.evaluateXQuery(XQueryEvaluator.java:166)
at org.teiid.query.processor.relational.XMLTableNode$1.run(XMLTableNode.java:225)
... 6 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months