container instanceof TranslatableProcedureContainer //we force the evaluation of procedure params - TODO: inserts are fine except for nonpushdown functions on columns
&& !CriteriaCapabilityValidatorVisitor.canPushLanguageObject(container, metadata.getModelID(container.getGroup().getMetadataID()), metadata, capFinder, analysisRecord)) {
//do a workaround of row-by-row processing for update/delete
if (metadata.getUniqueKeysInGroup(container.getGroup().getMetadataID()).isEmpty()
|| !CapabilitiesUtil.supports(Capability.CRITERIA_COMPARE_EQ, metadata.getModelID(container.getGroup().getMetadataID()), metadata, capFinder)) {
throw new QueryPlannerException(QueryPlugin.Util.getString("RelationalPlanner.nonpushdown_command", container)); //$NON-NLS-1$
}
//treat this as an update procedure
if (container instanceof Update) {
c = QueryRewriter.createUpdateProcedure((Update)container, metadata, context);
} else {
c = QueryRewriter.createDeleteProcedure((Delete)container, metadata, context);
}
addNestedCommand(sourceNode, container.getGroup(), container, c, false);
return false;
}
//plan any subqueries in criteria/parameters/values
for (SubqueryContainer<?> subqueryContainer : ValueIteratorProviderCollectorVisitor.getValueIteratorProviders(container)) {
if (c == null && container.getGroup().isTempTable()) {
if (subqueryContainer.getCommand().getCorrelatedReferences() == null) {
if (subqueryContainer instanceof ScalarSubquery) {
((ScalarSubquery) subqueryContainer).setShouldEvaluate(true);
} else if (subqueryContainer instanceof ExistsCriteria) {
((ExistsCriteria) subqueryContainer).setShouldEvaluate(true);
} else {
throw new QueryPlannerException(QueryPlugin.Util.getString("RelationalPlanner.nonpushdown_command", container)); //$NON-NLS-1$
}
} else {
throw new QueryPlannerException(QueryPlugin.Util.getString("RelationalPlanner.nonpushdown_command", container)); //$NON-NLS-1$
}
}
ProcessorPlan plan = QueryOptimizer.optimizePlan(subqueryContainer.getCommand(), metadata, null, capFinder, analysisRecord, context);
subqueryContainer.getCommand().setProcessorPlan(plan);