-
1. Re: Empty WHERE clause for unsupported translator capability
rareddy Jun 26, 2017 9:18 AM (in response to tomesc)Thomas,
ExecutionFactory has many different methods that start with "supports" prefix, these are all capabilities that you need to set based on your translator. A list is defined here [1]. Look for methods like "supportsCompareCriteriaEquals" and "supportsComapreCriteriaOrdered" + many more methods. On QueryExpression, is typically a "Select" expression, you need to typecast to that then ask for the "where" on it.
As per contributing back to the community, we would very much appreciate it. Let's start with adding JIRA first, then you can assign to yourself. Then follow the environment setup [2], then when done developing the translator send pull request on github for your changes.
[1] Translator Capabilities · Teiid Documentation
[2] Teiid Eclipse Dev Environment Set Up and Building Runtime Artifacts
-
2. Re: Empty WHERE clause for unsupported translator capability
tomesc Jun 26, 2017 11:17 AM (in response to rareddy)Very thanks for your answer.
Maybe I was not clear enough. I know the "support" methods and how to get the "where" clause.
I use TEIID version 8. If I do not overwrite the "supportsComapreCriteriaOrdered" method, the sign ">" will not be supported. But If I send a statement like "select A from T where A > 'X' " anyway, the QueryExpression contains no WHERE clause ("select A from T" only) and my translator assume that no WHERE clause was specified, and tries to deliver all records.
If I overwrite "supportsComapreCriteriaOrdered" (to deliver TRUE), the QueryExpression contains the WHERE clause as expected.
I would like to distinguish whether the WHERE clause were suppressed by TEIID or it was not specified.
Regards,
Thomas
-
3. Re: Empty WHERE clause for unsupported translator capability
rareddy Jun 26, 2017 2:45 PM (in response to tomesc)It is not really suppressed, but in the case when you did not define the "supportsCompareCriteriaOrdered", the Teiid engine modifies the query to which that of supported by the translator and then applies that criteria on results in its engine. Thus in case some translators like "file" sources do not support WHERE Teiid provides that functionality. So, each "supports" describes a different capability.
-
4. Re: Empty WHERE clause for unsupported translator capability
tomesc Jun 27, 2017 2:00 AM (in response to rareddy)Thanks a lot. Now I am understanding this behaviour.