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