dynamobi/dynamobi — Issue #537: [FRG-335] support DML operations on loopback link tables
Author: dynamobi-build
Created: 2011-12-30 03:34:08+00:00
State: open
Labels: FRG, JDBC Foreign Data Wrapper

[reporter="jvs", created="Tue, 19 Aug 2008 16:22:53 -0500 (GMT-05:00)"]
We currently support queries only on these; see farrago/unitsql/loopback.sql.

It should be possible to write a rule which looks for TableModificationRels and does a target table substitution similar to what happens currently (for queries) in MedJdbcColumnSet.optimizeLoopbackLink. The result would still be a logical TableModificationRel.

One complication is that we need this rule to fire BEFORE the corresponding physical transformation (e.g. FtrsTableModificationRule or LcsTableAppendRule) fires. For a Hep-based planner, this is not currently guaranteed since all of the SQL/MED plugin rules fire at the same step in the program, in no particular order. So we probably need to fire the loopback rule explicitly earlier. (This can be done by name so that we don't have to create an explicit dependency on the JDBC foreign wrapper plugin; search for "FtrsScanToSearchRule" in FarragoDefaultHeuristicPlanner to see how this works.)

FRG-334 also needs to be fixed to unblock this.