[
https://issues.jboss.org/browse/TEIID-3401?page=com.atlassian.jira.plugin...
]
Steven Hawkins commented on TEIID-3401:
---------------------------------------
Do you have any idea if any translator property or the way metadata
is generated will affect the query generation behaviour
The order by behavior will vary by translator. For most the expectation is that the
engine will use aliases in the select clause, which will then be referenced in the order
by.
but with the web service translator the alias name is enclosed in
quotes causing the problem.
The web service translator? The ws translator only supports procedures.
Also, if you can point to the location where the url is converted to
sql, I can possibly debug and see what is going wrong.
Ideally you'd first seem at what layer an issue is occurring. From the top down with
the odata path you have:
Odata URL -> Teiid SQL query (odata layer)
Teiid SQL query planning -> processor plan (engine)
Pushdown query -> source specific query (translator)
With logging you should be able to see when things become invalid. With debugging, you
can see the OData layer issue queries in org.teiid.odata.LocalClient. Then see the
pushdown queries in org.teiid.dqp.internal.datamgr.DataManagerImpl.registerRequest, then
see the source specific in whatever translator you are using.
OData layer generates incorrect alias names in orderby
------------------------------------------------------
Key: TEIID-3401
URL:
https://issues.jboss.org/browse/TEIID-3401
Project: Teiid
Issue Type: Bug
Components: OData
Reporter: Sanjeev Gour
Assignee: Steven Hawkins
Fix For: 8.7
When a table has large number of columns, a request like the following
http://localhost:8080/odata/VDB.1/objectName generates a query like SELECT col1 as c_1,
col2 as c2.....col23 as c_23...col35 as c_35 ..FROM objectName ORDER BY "c_0",
"c_1", "c_2", "c_3", "c_2"3, "c_3"5.
Here c_0, c_1, c_2, c_3, c_23, c_35 happen to be the primary key columns. As seen in the
query, the quotes around the column alias are incorrect for c_23 and c_35 which results
into an invalid query.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)