Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add actionType and refact clinet-base and common Table class #1588

Merged
merged 14 commits into from
Feb 1, 2023
Prev Previous commit
Next Next commit
fix: compatible for jdk8
  • Loading branch information
leechor committed Feb 1, 2023
commit 30bfd54aceb68074e9cf1240b911511f85b1130e
8 changes: 6 additions & 2 deletions dinky-common/src/main/java/org/dinky/model/Table.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import java.io.Serializable;
import java.text.MessageFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -100,8 +101,11 @@ public static Table build(String name, String schema, List<Column> columns) {
@Transient
public String getFlinkTableWith(String flinkConfig) {
if (Asserts.isNotNullString(flinkConfig)) {
return SqlUtil.replaceAllParam(
flinkConfig, Map.of("schemaName", schema, "tableName", name));
Map<String, String> replacements = new HashMap<>();
replacements.put("schemaName", schema);
replacements.put("tableName", name);

return SqlUtil.replaceAllParam(flinkConfig, replacements);
}
return "";
}
Expand Down