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

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

commit cb5fe27b5ac296b319c0dc2998a4010e3ac53b4f
Author: Nitin-Kashyap <66766227+nitin-kash...@users.noreply.github.com>
AuthorDate: Wed Jan 17 21:07:25 2024 +0530

    [fix](ut) fixed test cases failure for showCreateFunction (#28593)
    
    2 tests cases (ShowCreateFunctionTest and ShowFunctionTest) have function 
name clash;
    because of which one of the test fails to complete setup() and eventually 
fail for not able to create funciton.
    
    Changed the name of the test function in 1 of the file.
---
 .../org/apache/doris/analysis/ShowCreateFunctionTest.java    | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/fe/fe-core/src/test/java/org/apache/doris/analysis/ShowCreateFunctionTest.java
 
b/fe/fe-core/src/test/java/org/apache/doris/analysis/ShowCreateFunctionTest.java
index f89f6fdbf35..30256d394de 100644
--- 
a/fe/fe-core/src/test/java/org/apache/doris/analysis/ShowCreateFunctionTest.java
+++ 
b/fe/fe-core/src/test/java/org/apache/doris/analysis/ShowCreateFunctionTest.java
@@ -34,28 +34,28 @@ public class ShowCreateFunctionTest extends 
TestWithFeService {
         createDatabase(dbName);
         useDatabase(dbName);
         createFunction(
-                "CREATE ALIAS FUNCTION id_masking(bigint) WITH PARAMETER(id) 
AS CONCAT(LEFT(id,3),'****',RIGHT(id,4));");
+                "CREATE ALIAS FUNCTION id_masking_create(bigint) WITH 
PARAMETER(id) AS CONCAT(LEFT(id,3),'****',RIGHT(id,4));");
 
         createFunction(
-                "CREATE GLOBAL ALIAS FUNCTION id_masking_global(bigint) WITH 
PARAMETER(id) AS CONCAT(LEFT(id,3),'****',RIGHT(id,4));");
+                "CREATE GLOBAL ALIAS FUNCTION id_masking_global_create(bigint) 
WITH PARAMETER(id) AS CONCAT(LEFT(id,3),'****',RIGHT(id,4));");
     }
 
 
     @Test
     public void testNormal() throws Exception {
-        String sql = "SHOW CREATE FUNCTION id_masking(bigint)";
+        String sql = "SHOW CREATE FUNCTION id_masking_create(bigint)";
         ShowResultSet showResultSet = showCreateFunction(sql);
         String showSql = showResultSet.getResultRows().get(0).get(1);
-        Assertions.assertTrue(showSql.contains("CREATE ALIAS FUNCTION 
id_masking(BIGINT) WITH PARAMETER(id)"));
+        Assertions.assertTrue(showSql.contains("CREATE ALIAS FUNCTION 
id_masking_create(BIGINT) WITH PARAMETER(id)"));
     }
 
     @Test
     public void testShowCreateGlobalFunction() throws Exception {
-        String sql = "SHOW CREATE GLOBAL FUNCTION id_masking_global(bigint)";
+        String sql = "SHOW CREATE GLOBAL FUNCTION 
id_masking_global_create(bigint)";
         ShowResultSet showResultSet = showCreateFunction(sql);
         String showSql = showResultSet.getResultRows().get(0).get(1);
         Assertions.assertTrue(
-                showSql.contains("CREATE GLOBAL ALIAS FUNCTION 
id_masking_global(BIGINT) WITH PARAMETER(id)"));
+                showSql.contains("CREATE GLOBAL ALIAS FUNCTION 
id_masking_global_create(BIGINT) WITH PARAMETER(id)"));
     }
 
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to