This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new fef6f7c312d [branch-3.0](fix) fix function rules are not persisted 
(#52817) (#53263)
fef6f7c312d is described below

commit fef6f7c312d093436583d009995dcc29e687257b
Author: Mingyu Chen (Rayner) <[email protected]>
AuthorDate: Tue Jul 15 20:43:03 2025 -0700

    [branch-3.0](fix) fix function rules are not persisted (#52817) (#53263)
    
    pick part of #52817
---
 .../src/main/java/org/apache/doris/catalog/JdbcTable.java  | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/JdbcTable.java 
b/fe/fe-core/src/main/java/org/apache/doris/catalog/JdbcTable.java
index adf013576b3..1f7ccfa56a1 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/JdbcTable.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/JdbcTable.java
@@ -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();
@@ -419,8 +422,9 @@ public class JdbcTable extends Table {
 
     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;
     }
 
     /**
@@ -529,4 +533,10 @@ public class JdbcTable extends Table {
     public ExternalFunctionRules getExternalFunctionRules() {
         return functionRules;
     }
+
+    @Override
+    public void gsonPostProcess() throws IOException {
+        super.gsonPostProcess();
+        functionRules = ExternalFunctionRules.create(jdbcTypeName, 
Strings.nullToEmpty(functionRulesString));
+    }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to