[teiid-issues] [JBoss JIRA] (TEIID-5067) Incorrect source query with simple inherent updates
Steven Hawkins (JIRA)
issues at jboss.org
Fri Sep 15 13:29:00 EDT 2017
[ https://issues.jboss.org/browse/TEIID-5067?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steven Hawkins resolved TEIID-5067.
-----------------------------------
Resolution: Done
Corrected the delete and update to consider all columns that are used in the simple case so that a compensating query can be used instead when a non-mappable column is used.
> Incorrect source query with simple inherent updates
> ---------------------------------------------------
>
> Key: TEIID-5067
> URL: https://issues.jboss.org/browse/TEIID-5067
> Project: Teiid
> Issue Type: Bug
> Components: JDG Connector, Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Priority: Critical
> Fix For: 10.0, 8.12.x-6.4, 9.3.4, 9.2.6
>
>
> 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).
> {code}
> 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;
> {code}
> And following queries:
> {code:sql|title=DELETE query}
> DELETE FROM VSmallA WHERE IntValue=13
> UPDATE VSmallA Set StringKey='a' WHERE IntValue=13
> {code}
> I get an incorrect source query with x.intvalue in the predicate.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the teiid-issues
mailing list