From 4608bcd7bf57201439e123dbcf2c339d3a2f6d05 Mon Sep 17 00:00:00 2001 From: Nitin-Kashyap <66766227+Nitin-Kashyap@users.noreply.github.com> Date: Wed, 17 Jan 2024 21:07:25 +0530 Subject: [PATCH] [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. --- .../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 f89f6fdbf3..30256d394d 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)")); } }