[chore](error msg) print type info when colocate with ddl failed due to type mismatch (#28773)

This commit is contained in:
zhiqiang
2023-12-22 12:48:20 +08:00
committed by GitHub
parent 012e66729a
commit e4c7d4d03a
2 changed files with 5 additions and 2 deletions

View File

@ -105,8 +105,11 @@ public class ColocateGroupSchema implements Writable {
continue;
}
if (!targetColType.equals(info.getDistributionColumns().get(i).getType())) {
String typeName = info.getDistributionColumns().get(i).getType().toString();
String colName = info.getDistributionColumns().get(i).getName();
String formattedString = colName + "(" + typeName + ")";
ErrorReport.reportDdlException(ErrorCode.ERR_COLOCATE_TABLE_MUST_HAS_SAME_DISTRIBUTION_COLUMN_TYPE,
info.getDistributionColumns().get(i).getName(), targetColType);
formattedString, targetColType);
}
}
}