use of io.dingodb.calcite.DingoTable in project dingo by dingodb.
the class DingoPartModifyRule method checkUpdateInPart.
private static void checkUpdateInPart(@Nonnull DingoTableModify rel) {
DingoTable table = rel.getTable().unwrap(DingoTable.class);
assert table != null;
TableDefinition td = table.getTableDefinition();
List<String> updateList = rel.getUpdateColumnList();
if (updateList != null && updateList.stream().anyMatch(c -> Objects.requireNonNull(td.getColumn(c)).isPrimary())) {
throw new IllegalStateException("Update columns " + updateList + " contain primary columns and are not supported.");
}
}
Aggregations