use of io.crate.planner.projection.SysUpdateProjection in project crate by crate.
the class UpdateConsumer method createSysTableUpdatePlan.
private static Plan createSysTableUpdatePlan(TableInfo tableInfo, Planner.Context plannerContext, UpdateAnalyzedStatement.NestedAnalyzedStatement nestedStatement) {
Routing routing = plannerContext.allocateRouting(tableInfo, nestedStatement.whereClause(), Preference.PRIMARY.type());
Reference idReference = tableInfo.getReference(DocSysColumns.ID);
assert idReference != null : "table has no _id column";
SysUpdateProjection updateProjection = new SysUpdateProjection(idReference.valueType(), nestedStatement.assignments());
return createPlan(plannerContext, routing, tableInfo, idReference, updateProjection, nestedStatement.whereClause());
}
Aggregations