Skip to content

Commit

Permalink
[fix](compile) fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
dataroaring committed Sep 21, 2024
1 parent f640e87 commit 349f5e3
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ public static Expression acos(DoubleLiteral literal) {
}
}

/**
* append_trailing_char_if_absent function
*/
@ExecFunction(name = "append_trailing_char_if_absent", argTypes = {"VARCHAR", "VARCHAR"}, returnType = "VARCHAR")
public static Expression appendTrailingIfCharAbsent(StringLikeLiteral literal, StringLikeLiteral chr) {
if (chr.getValue().length() != 1) {
Expand All @@ -113,7 +116,7 @@ public static Expression appendTrailingIfCharAbsent(StringLikeLiteral literal, S
if (literal.getValue().endsWith(chr.getValue())) {
return literal;
} else {
return new VarcharLiteral( literal.getValue() + chr.getValue());
return new VarcharLiteral(literal.getValue() + chr.getValue());
}
}

Expand Down

0 comments on commit 349f5e3

Please sign in to comment.