if (primaryKeyPairs == null) {
throw new NotMatchPrimaryKeyException("Not match primary key.");
}
byte[] primayKey = RowBuilder.build().genRowkey(primaryKeyPairs);
DeleteAction action = new DeleteAction(wtableName, primayKey);
if (context.isGenWholePlan()) {
Condition entityGroupKeyCondition = ParserUtils.getCondition(table
.getEntityGroupKey().getName(), eqConditions);
// Get entityGroupLocation according to entity group key
EntityGroupLocation entityGroupLocation = this.connection
.locateEntityGroup(Bytes.toBytes(table.getTableName()), DruidParser
.convert(table.getColumn(entityGroupKeyCondition.getFieldName()),
entityGroupKeyCondition.getValue()));
action.setEntityGroupLocation(entityGroupLocation);
}
List<DeleteAction> actions = new ArrayList<DeleteAction>();
actions.add(action);
DeletePlan deletePlan = new DeletePlan(actions);
context.setPlan(deletePlan);