mirror of
https://gitee.com/dromara/dbswitch.git
synced 2025-10-13 13:20:22 +00:00
小问题修复
This commit is contained in:
@@ -348,13 +348,13 @@ public class DorisMetadataQueryProvider extends AbstractMetadataProvider {
|
||||
@Override
|
||||
public void postAppendCreateTableSql(StringBuilder builder, String tblComment, List<String> primaryKeys,
|
||||
SourceProperties tblProperties) {
|
||||
if (StringUtils.isNotBlank(tblComment)) {
|
||||
builder.append(String.format(" COMMENT '%s' ", tblComment.replace("'", "\\'" )));
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(primaryKeys)) {
|
||||
String primaryKeyAsString = getPrimaryKeyAsString(primaryKeys);
|
||||
// 自动分桶(BUCKETS AUTO)功能要求 Apache Doris 1.2.2 及以上版本
|
||||
builder.append(" DISTRIBUTED BY HASH(").append(primaryKeyAsString).append(") BUCKETS AUTO");
|
||||
if (StringUtils.isNotBlank(tblComment)) {
|
||||
builder.append(String.format(" COMMENT='%s' ", tblComment.replace("'", "\\'")));
|
||||
}
|
||||
builder.append(" DISTRIBUTED BY HASH(").append(primaryKeyAsString).append(") BUCKETS AUTO ");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user