Skip to content

Commit

Permalink
Trino dialect, the extract function supports dow and week parameters
Browse files Browse the repository at this point in the history
Signed-off-by: zhiminr.ren <[email protected]>
  • Loading branch information
renzhimin7 committed Nov 14, 2024
1 parent 21f42c0 commit ec30a0c
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Check failure on line 236 in fe/fe-core/src/main/java/com/starrocks/connector/parser/trino/Trino2SRFunctionCallTransformer.java

View workflow job for this annotation

GitHub Actions / FE Code Style Check

[checkstyle] reported by reviewdog 🐶 ',' is preceded with whitespace. Raw Output: /github/workspace/./fe/fe-core/src/main/java/com/starrocks/connector/parser/trino/Trino2SRFunctionCallTransformer.java:236:55: error: ',' is preceded with whitespace. (com.puppycrawl.tools.checkstyle.checks.whitespace.NoWhitespaceBeforeCheck)

Check failure on line 236 in fe/fe-core/src/main/java/com/starrocks/connector/parser/trino/Trino2SRFunctionCallTransformer.java

View workflow job for this annotation

GitHub Actions / FE Code Style Check

[checkstyle] reported by reviewdog 🐶 ',' is not followed by whitespace. Raw Output: /github/workspace/./fe/fe-core/src/main/java/com/starrocks/connector/parser/trino/Trino2SRFunctionCallTransformer.java:236:55: error: ',' is not followed by whitespace. (com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAfterCheck)
}

private static void registerStringFunctionTransformer() {
Expand Down

0 comments on commit ec30a0c

Please sign in to comment.