From ec30a0c1ff892716dff528ce4daab4dd20b9a71e Mon Sep 17 00:00:00 2001 From: "zhiminr.ren" <1240388654@qq.com> Date: Thu, 14 Nov 2024 13:14:47 +0800 Subject: [PATCH] Trino dialect, the extract function supports dow and week parameters Signed-off-by: zhiminr.ren <1240388654@qq.com> --- .../connector/parser/trino/Trino2SRFunctionCallTransformer.java | 2 ++ 1 file changed, 2 insertions(+) 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 87f11a2cf0cde..a51e342a6e0e1 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 @@ -232,6 +232,8 @@ private static void registerDateFunctionTransformer() { // last_day_of_month(x) -> last_day(x,'month') registerFunctionTransformer("last_day_of_month", 1, new FunctionCallExpr("last_day", List.of(new PlaceholderExpr(1, Expr.class), new StringLiteral("month")))); + // year -> year + registerFunctionTransformer("year", 1, "year" ,List.of(Expr.class)); } private static void registerStringFunctionTransformer() {