[JBoss JIRA] Created: (TEIID-1374) Nested correlated reference issue with rewritten queries
by Steven Hawkins (JIRA)
Nested correlated reference issue with rewritten queries
--------------------------------------------------------
Key: TEIID-1374
URL: https://jira.jboss.org/browse/TEIID-1374
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 7.0
Reporter: Steven Hawkins
Assignee: Steven Hawkins
In a query such as "select * from bqt1.smalla where exists (select intnum from bqt1.smalla x where smalla.intnum = x.intnum and exists (select intnum from bqt1.smalla where exists (select intnum from bqt1.smalla x where smalla.intnum = x.intnum)))" we will inappropriately report that the top exists subquery has 2 correlated references since we see the more deeply nested smalla.intnum also.
This is generally not a issue, it can introduce errors in places where subqueries are rewritten, such as with subquery optimization or inherently updatable view queries.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (TEIID-2116) Serialized datatype issue
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-2116:
-------------------------------------
Summary: Serialized datatype issue
Key: TEIID-2116
URL: https://issues.jboss.org/browse/TEIID-2116
Project: Teiid
Issue Type: Quality Risk
Components: Server
Affects Versions: 7.1
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 8.1
Serialized metadata will contain references to datatype entries that will be duplicated upon deserialization with system'vdb type entries. Ideally there should be only 1 representation of each unique type.
In general we have a representation issue with datatypes, which are either system or vdb scoped, when we serialize just a MetadataFactory that only represents a schema.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (TEIID-2138) Use of the PG DSN for for ODBC metadata queries can result in improperly escaped SQL
by Johnathon Lee (JIRA)
Johnathon Lee created TEIID-2138:
------------------------------------
Summary: Use of the PG DSN for for ODBC metadata queries can result in improperly escaped SQL
Key: TEIID-2138
URL: https://issues.jboss.org/browse/TEIID-2138
Project: Teiid
Issue Type: Bug
Components: ODBC, Query Engine
Affects Versions: 7.7
Reporter: Johnathon Lee
Assignee: Steven Hawkins
Various clients (Cognos, Excel, DBVisualizer) exhibit different results when querying metadata.
For instance:
Querying ModeShape on a fresh 5.3 deploy.
select relname from pg_catalog.pg_class c, pg_catalog.pg_namespace n where relname like E'ddl\\_alterable' and n.oid = relnamespace
0 Records
select relname from pg_catalog.pg_class c, pg_catalog.pg_namespace n where relname like E'ddl\_alterable' and n.oid = relnamespace
1 Record: ddl_alterable
select relname from pg_catalog.pg_class c, pg_catalog.pg_namespace n where relname like E'ddl\_alterab__' and n.oid = relnamespace
1 Record: ddl_alterable
Looking at [1] per [2]. It seems proper escaping of the E'literal' syntax is not always being performed. The Third example above shows that a wildcard is being escaped and happens to match to a literal value it expects.
[1]
PostgreSQL also accepts "escape" string constants, which are an extension to the SQL standard. An escape string constant is specified by writing the letter E (upper or lower case) just before the opening single quote, e.g. E'foo'. (When continuing an escape string constant across lines, write E only before the first opening quote.) Within an escape string, a backslash character (\) begins a C-like backslash escape sequence, in which the combination of backslash and following character(s) represents a special byte value. \b is a backspace, \f is a form feed, \n is a newline, \r is a carriage return, \t is a tab. Also supported are \digits, where digits represents an octal byte value, and \xhexdigits, where hexdigits represents a hexadecimal byte value. (It is your responsibility that the byte sequences you create are valid characters in the server character set encoding.) Any other character following a backslash is taken literally. Thus, to include a backslash character, write two backslashes (\\). Also, a single quote can be included in an escape string by writing \', in addition to the normal way of ''.
[2] http://www.postgresql.org/docs/8.3/interactive/sql-syntax-lexical.html#SQ...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (TEIID-2134) Select literal query causes NPE
by Hisanobu Okuda (JIRA)
Hisanobu Okuda created TEIID-2134:
-------------------------------------
Summary: Select literal query causes NPE
Key: TEIID-2134
URL: https://issues.jboss.org/browse/TEIID-2134
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 7.7, 7.4.1
Environment: EDS 5.2.0 GA
Reporter: Hisanobu Okuda
Assignee: Steven Hawkins
I deployed the attached vdb and run the following query:-
SELECT
base.category
FROM
DF.V.BASE AS base
left outer JOIN
(
SELECT
code,
category
FROM
DF.V.TYPES) AS types
ON
types.code = base.code;
Then, it caused NPE:-
07:49:31,084 ERROR [PROCESSOR] Unexpected exception for request 7mHtpqQ7yb3J.0
java.lang.NullPointerException
at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.setColStatEstimates(NewCalculateCostUtil.java:427)
at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.setCardinalityEstimate(NewCalculateCostUtil.java:328)
at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.estimateSetOpCost(NewCalculateCostUtil.java:274)
at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.computeNodeCost(NewCalculateCostUtil.java:226)
at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.updateCardinality(NewCalculateCostUtil.java:158)
at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.updateCardinality(NewCalculateCostUtil.java:155)
at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.updateCardinality(NewCalculateCostUtil.java:155)
at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.updateCardinality(NewCalculateCostUtil.java:155)
at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.updateCardinality(NewCalculateCostUtil.java:155)
at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.updateCardinality(NewCalculateCostUtil.java:155)
at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.computeCostForTree(NewCalculateCostUtil.java:144)
at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.computeCostForDepJoin(NewCalculateCostUtil.java:1142)
at org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.computeCostForDepJoin(NewCalculateCostUtil.java:1131)
at org.teiid.query.optimizer.relational.rules.RuleChooseDependent.execute(RuleChooseDependent.java:93)
at org.teiid.query.optimizer.relational.RelationalPlanner.executeRules(RelationalPlanner.java:463)
at org.teiid.query.optimizer.relational.RelationalPlanner.optimize(RelationalPlanner.java:227)
at org.teiid.query.optimizer.QueryOptimizer.optimizePlan(QueryOptimizer.java:192)
at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:433)
at org.teiid.dqp.internal.process.Request.processRequest(Request.java:456)
at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:482)
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:271)
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:49)
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:210)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:238)
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:122)
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:292)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month