dynamobi/dynamobi — Issue #78: [LDB-245] Allow dynamic parameters for MERGE
Author: dynamobi-build
Created: 2011-12-30 02:11:25+00:00
State: open
Labels: LCS, LDB

[reporter="ksecretan", created="Fri, 15 Jul 2011 21:49:37 -0500 (GMT-05:00)"]
UPDATE queries are rewritten to MERGE queries by LucidDB, so while an update statement with dynamic params works under Farrago, it fails under LucidDB with the MERGE rewrite.

In the validateMerge, I found this:

validateSelect(sqlSelect, unknownType);

which when it reaches the inference step on the dynamic parameters fails. My fix has been to replace the unknownType with a targetRowType derived from either the update or insert statement if available. This lets it validate. Does anyone see anything wrong with this?