From d1e089ecd7f6f328b590a460bac1bcce20e04ab8 Mon Sep 17 00:00:00 2001 From: happut Date: Wed, 26 Jun 2024 17:15:28 +0800 Subject: [PATCH] [Enhancement] Add Trino HLL Function Compatibility Mapping and last_day_of_month Support(StarRocks#40894) Signed-off-by: happut --- .../parser/trino/Trino2SRFunctionCallTransformer.java | 3 --- .../connector/parser/trino/TrinoFunctionTransformTest.java | 3 --- 2 files changed, 6 deletions(-) diff --git a/fe/fe-core/src/main/java/com/starrocks/connector/parser/trino/Trino2SRFunctionCallTransformer.java b/fe/fe-core/src/main/java/com/starrocks/connector/parser/trino/Trino2SRFunctionCallTransformer.java index e582ee422cc79..787e3a801a995 100644 --- a/fe/fe-core/src/main/java/com/starrocks/connector/parser/trino/Trino2SRFunctionCallTransformer.java +++ b/fe/fe-core/src/main/java/com/starrocks/connector/parser/trino/Trino2SRFunctionCallTransformer.java @@ -316,9 +316,6 @@ private static void registerBinaryFunctionTransformer() { } private static void registerHLLFunctionTransformer() { - // cardinality -> hll_cardinality - registerFunctionTransformer("cardinality", 1, "hll_cardinality", List.of(Expr.class)); - // approx_set -> HLL_HASH registerFunctionTransformer("approx_set", 1, "hll_hash", List.of(Expr.class)); diff --git a/fe/fe-core/src/test/java/com/starrocks/connector/parser/trino/TrinoFunctionTransformTest.java b/fe/fe-core/src/test/java/com/starrocks/connector/parser/trino/TrinoFunctionTransformTest.java index 6a6d6451f9dc3..166e537d48290 100644 --- a/fe/fe-core/src/test/java/com/starrocks/connector/parser/trino/TrinoFunctionTransformTest.java +++ b/fe/fe-core/src/test/java/com/starrocks/connector/parser/trino/TrinoFunctionTransformTest.java @@ -448,9 +448,6 @@ public void testHllFunction() throws Exception { String sql = "select empty_approx_set()"; assertPlanContains(sql, " : HLL_EMPTY()"); - sql = "select cardinality(empty_approx_set())"; - assertPlanContains(sql, " : hll_cardinality(HLL_EMPTY())"); - sql = "select approx_set(\"tc\") from tall"; assertPlanContains(sql, " : hll_hash(CAST(3: tc AS VARCHAR))");