protected void runOperatorPlan(Plan plan, Session session,
RowData oldRow, RowData newRow) {
QueryContext context =
new SimpleQueryContext(store.createAdapter(session, plan.schema),
serviceManager);
QueryBindings bindings = context.createBindings();
if (plan.bindOldRow) {
RowDataValueSource source = new RowDataValueSource();
for (int i = 0; i < plan.ncols; i++) {
source.bind(plan.referencedFields[i], oldRow);
bindings.setValue(i, source);
}
}
if (plan.bindNewRow) {
RowDataValueSource source = new RowDataValueSource();
for (int i = 0; i < plan.ncols; i++) {
source.bind(plan.referencedFields[i], newRow);
bindings.setValue(plan.referencedFields.length + i, source);
}
}
else if (plan.bindValues != null) {
for (int i = 0; i < plan.ncols; i++) {
bindings.setValue(plan.bindValues.length + i, plan.bindValues[i]);
}
}
plan.plannable.run(context, bindings);
}