-
1. Re: Passing down partial predicates to translator
rareddy Aug 15, 2014 8:41 AM (in response to mickalas)Mick,
Yes, you can do such processing. How are you building your metadata for your source? When you are creating the schema for "table" you need to set property called "searchability" to false on column "b" and by default it is true. Take look at at "Column.setSearchType" method. When column is seachable, Teiid query engine passes any predicates involved with it, otherwise engine will handle it.
An example see here https://github.com/teiid/teiid/blob/master/connectors/translator-solr/src/main/java/org/teiid/translator/solr/SolrMetadataProcessor.java
HTH.
Ramesh..
-
2. Re: Passing down partial predicates to translator
shawkins Aug 15, 2014 8:45 AM (in response to mickalas)1 of 1 people found this helpful> Then in the case above I'd like to be passed
> SELECT a,b,c FROM table WHERE a = 'x'
If column b is marked as unsearchable (DDL Metadata - Teiid 8.9 (draft) - Project Documentation Editor), but is a comparable type, then we'll not push the b predicate and just evaluate it in the engine.
> Alteratively teiid could pass
> SELECT a,b,c FROM table
Here you are asking for the translator to optional apply predicates and also apply them in the engine. In this case, no there is not anything for that. The strategy is also a little awkward for anything other than a simple query with conjunctive predicates. An optional join predicate, OR, etc. would not be as easy to handle this way.
-
3. Re: Passing down partial predicates to translator
mickalas Aug 15, 2014 10:36 AM (in response to rareddy)Just tried that out and it works a treat.
Thanks a lot for both your help.
Mick