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

There should be a way to set cardinalities for views containing texttable and other table functions


    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: Major Major
    • Backlog
    • None
    • Query Engine
    • None
    • Undefined

      If you use a view to represent access to a texttable it would be great in some instances to associate the cardinality at a view layer - but that view layer will currently be removed before cardinalities are assigned. The possibilities are:

      1. require the use of no_unnest if you want to associate the cardinality with a view. This has additional book-keeping issues in that any criteria or other constructs that are pushed would need to have the cardinality set on the node that is pushed the furthest.
      2. implicitly don't unnest if there's no further optimization that can be performed on the view - for example if it contains only a single source node, and then use the view cardinality given the same logic that would be required for 1.
      3. allow for associating cardinality directly on table reference functions via a hint or syntax such that it would be generally useful.

      3 in some ways is the least amount of work given the current logic.

      The workaround in these situations is to create either a materialized view or a materialized common table.

            Unassigned Unassigned
            rhn-engineering-shawkins Steven Hawkins
            0 Vote for this issue
            1 Start watching this issue