[teiid-issues] [JBoss JIRA] Commented: (TEIID-1326) API request: rewrite query/command before it reaches the teiid planner
Steven Hawkins (JIRA)
jira-events at lists.jboss.org
Wed Oct 27 15:30:54 EDT 2010
[ https://jira.jboss.org/browse/TEIID-1326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12559787#action_12559787 ]
Steven Hawkins commented on TEIID-1326:
---------------------------------------
1) it seems like we would traditionally define this as some combination of multi-source / partial results support. are your sources heterogeneous database types and/or do they have different tables/column that you are integrating?
2) could changing the SELECT or the WHERE based upon the user / role allow this to be done with a single view definition: select case when hasRole... end from ... where col = case user() ... end?
To state this slightly differently, if you just had a way to statically define views (with SQL that enforces the security) and then utilized multi-source support to dynamically add or remove homogeneous sources, would that meet your needs?
> API request: rewrite query/command before it reaches the teiid planner
> -----------------------------------------------------------------------
>
> Key: TEIID-1326
> URL: https://jira.jboss.org/browse/TEIID-1326
> Project: Teiid
> Issue Type: Feature Request
> Components: Query Engine
> Affects Versions: 7.1
> Reporter: Mark Addleman
> Assignee: Steven Hawkins
>
> I'd like an API to inspect and rewrite a user query/command before it reaches the Teiid planner. The use case is to rewrite the query/command to implement view-like capabilities. For example:
> SELECT a,b,c FROM table1 AS t WHERE t.a='xyz' would be rewritten as:
> SELECT a,b,c FROM (SELECT a,b,c FROM table2 UNION SELECT a,b,c FROM table3) AS t
> I imagine this API would be similar to the translator API: it would receive a data structure representing the query/command and use a visitor to rewrite the query. As a convenience, it would be nice to have something similar to the SQLConversionVisitor.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the teiid-issues
mailing list