Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ public void analyze(Analyzer analyzer) throws UserException {
@Override
public String toSql() {
return "ALTER CATALOG " + catalogName + " SET PROPERTIES ("
+ new PrintableMap<>(newProperties, "=", true, false, ",") + ")";
+ new PrintableMap<>(newProperties, "=", true, false, true) + ")";
}

@Override
public boolean needAuditEncryption() {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ public void analyze(Analyzer analyzer) throws UserException {
public String toSql() {
StringBuilder sb = new StringBuilder();
sb.append("ALTER RESOURCE '").append(resourceName).append("' ");
sb.append("PROPERTIES(").append(new PrintableMap<>(properties, " = ", true, false)).append(")");
sb.append("PROPERTIES(").append(new PrintableMap<>(properties, " = ", true, false, true)).append(")");
return sb.toString();
}

@Override
public boolean needAuditEncryption() {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public String toSql() {

if (properties != null && !properties.isEmpty()) {
sb.append("\nPROPERTIES (");
sb.append(new PrintableMap<>(properties, "=", true, false));
sb.append(new PrintableMap<>(properties, "=", true, false, true));
sb.append(")");
}
return sb.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,14 @@ public String toSql() {
}
if (properties.size() > 0) {
stringBuilder.append("\nPROPERTIES (\n");
stringBuilder.append(new PrintableMap<>(properties, "=", true, true, false));
stringBuilder.append(new PrintableMap<>(properties, "=", true, true, true));
stringBuilder.append("\n)");
}
return stringBuilder.toString();
}

@Override
public boolean needAuditEncryption() {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,9 @@ public String toSql() {
sb.append("REPOSITORY `").append(name).append("` WITH ").append(storage.toSql());
return sb.toString();
}

@Override
public boolean needAuditEncryption() {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,12 @@ public String toSql() {
sb.append("EXTERNAL ");
}
sb.append("RESOURCE '").append(resourceName).append("' ");
sb.append("PROPERTIES(").append(new PrintableMap<>(properties, " = ", true, false)).append(")");
sb.append("PROPERTIES(").append(new PrintableMap<>(properties, " = ", true, false, true)).append(")");
return sb.toString();
}

@Override
public boolean needAuditEncryption() {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public String toSql() {
sb.append(" `").append(storageDesc.getName()).append("`");
}
sb.append(" ON LOCATION ").append(location).append(" PROPERTIES(")
.append(new PrintableMap<>(storageDesc.getProperties(), " = ", true, false))
.append(new PrintableMap<>(storageDesc.getProperties(), " = ", true, false, true))
.append(")");
return sb.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ public String getCreateStatement() {

stmtBuilder.append("\nPROPERTIES\n(");
stmtBuilder.append(new PrintableMap<>(this.getRemoteFileSystem().getProperties(), " = ",
true, true));
true, true, true));
stmtBuilder.append("\n)");
return stmtBuilder.toString();
}
Expand Down
5 changes: 3 additions & 2 deletions fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
Original file line number Diff line number Diff line change
Expand Up @@ -3363,7 +3363,7 @@ public static void getDdlStmt(DdlStmt ddlStmt, String dbName, TableIf table, Lis
sb.append("\nPROPERTIES (\n");
sb.append("\"database\" = \"").append(hiveTable.getHiveDb()).append("\",\n");
sb.append("\"table\" = \"").append(hiveTable.getHiveTable()).append("\",\n");
sb.append(new PrintableMap<>(hiveTable.getHiveProperties(), " = ", true, true, false).toString());
sb.append(new PrintableMap<>(hiveTable.getHiveProperties(), " = ", true, true, hidePassword).toString());
sb.append("\n)");
} else if (table.getType() == TableType.ICEBERG) {
IcebergTable icebergTable = (IcebergTable) table;
Expand All @@ -3374,7 +3374,8 @@ public static void getDdlStmt(DdlStmt ddlStmt, String dbName, TableIf table, Lis
sb.append("\nPROPERTIES (\n");
sb.append("\"iceberg.database\" = \"").append(icebergTable.getIcebergDb()).append("\",\n");
sb.append("\"iceberg.table\" = \"").append(icebergTable.getIcebergTbl()).append("\",\n");
sb.append(new PrintableMap<>(icebergTable.getIcebergProperties(), " = ", true, true, false).toString());
sb.append(new PrintableMap<>(icebergTable.getIcebergProperties(),
" = ", true, true, hidePassword).toString());
sb.append("\n)");
} else if (table.getType() == TableType.JDBC) {
JdbcTable jdbcTable = (JdbcTable) table;
Expand Down