Skip to content
Merged
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 @@ -105,6 +105,9 @@ public class JdbcTable extends Table {
private boolean connectionPoolKeepAlive;

private ExternalFunctionRules functionRules;
// This is used for edit log
@SerializedName("frs")
private String functionRulesString;

static {
Map<String, TOdbcTableType> tempMap = new CaseInsensitiveMap();
Expand Down Expand Up @@ -419,8 +422,9 @@ private void validate(Map<String, String> properties) throws DdlException {

private void checkAndSetExternalFunctionRules(Map<String, String> properties) throws DdlException {
ExternalFunctionRules.check(properties.getOrDefault(JdbcResource.FUNCTION_RULES, ""));
this.functionRules = ExternalFunctionRules.create(jdbcTypeName,
properties.getOrDefault(JdbcResource.FUNCTION_RULES, ""));
String functionRulesString = properties.getOrDefault(JdbcResource.FUNCTION_RULES, "");
this.functionRules = ExternalFunctionRules.create(jdbcTypeName, functionRulesString);
this.functionRulesString = functionRulesString;
}

/**
Expand Down Expand Up @@ -529,4 +533,10 @@ public void setExternalFunctionRules(ExternalFunctionRules functionRules) {
public ExternalFunctionRules getExternalFunctionRules() {
return functionRules;
}

@Override
public void gsonPostProcess() throws IOException {
super.gsonPostProcess();
functionRules = ExternalFunctionRules.create(jdbcTypeName, Strings.nullToEmpty(functionRulesString));
}
}
Loading