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

Incorrect source query with simple inherent updates

XMLWordPrintable

      A delete query against a view fails, when in WHERE clause there is a filter on non-directly mapped column. Please note, that the integer type is only example, this happens for any type (time/date/timestamp amongst other).

                CREATE FOREIGN TABLE SmallA (
                     IntValue string,
                     StringKey string PRIMARY KEY
                     ) OPTIONS(UPDATABLE true);
                 CREATE VIEW VSmallA(
                     IntValue integer,
                     StringKey string PRIMARY KEY
                 ) OPTIONS (UPDATABLE true) AS
                 SELECT
                     CONVERT(source.IntValue,integer), source.StringKey FROM Source.SmallA as source;
      

      And following queries:

      DELETE query
      DELETE FROM VSmallA WHERE IntValue=13
      UPDATE VSmallA Set StringKey='a' WHERE IntValue=13
      

      I get an incorrect source query with x.intvalue in the predicate.

              rhn-engineering-shawkins Steven Hawkins
              jstastny@redhat.com Jan Stastny
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: