Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-1326

API request: rewrite query/command before it reaches the teiid planner

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 7.4
    • 7.1
    • Query Engine
    • Documentation (Ref Guide, User Guide, etc.), Release Notes
    • Low

      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.

              rhn-engineering-shawkins Steven Hawkins
              markaddleman_jira Mark Addleman (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: