Skip to content

Commit

Permalink
[CALCITE-5383] Add CONCAT to BIG_QUERY dialect
Browse files Browse the repository at this point in the history
  • Loading branch information
olivrlee authored and libenchao committed Nov 16, 2022
1 parent 7277e53 commit 12e9ad4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ private SqlLibraryOperators() {

/** The "CONCAT(arg, ...)" function that concatenates strings.
* For example, "CONCAT('a', 'bc', 'd')" returns "abcd". */
@LibraryOperator(libraries = {MYSQL, POSTGRESQL})
@LibraryOperator(libraries = {MYSQL, POSTGRESQL, BIG_QUERY})
public static final SqlFunction CONCAT_FUNCTION =
new SqlFunction("CONCAT",
SqlKind.OTHER_FUNCTION,
Expand Down
2 changes: 1 addition & 1 deletion site/_docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2584,7 +2584,7 @@ semantics.
| o p | CHR(integer) | Returns the character whose UTF-8 code is *integer*
| o | COSH(numeric) | Returns the hyperbolic cosine of *numeric*
| o | CONCAT(string, string) | Concatenates two strings
| m p | CONCAT(string [, string ]*) | Concatenates two or more strings
| b m p | CONCAT(string [, string ]*) | Concatenates two or more strings
| m | COMPRESS(string) | Compresses a string using zlib compression and returns the result as a binary string.
| p | CONVERT_TIMEZONE(tz1, tz2, datetime) | Converts the timezone of *datetime* from *tz1* to *tz2*
| b | CURRENT_DATETIME([timezone]) | Returns the current time as a TIMESTAMP from *timezone*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1834,6 +1834,7 @@ protected static Calendar getCalendarNotTooNear(int timeUnit) {
final SqlOperatorFixture f = fixture();
checkConcatFunc(f.withLibrary(SqlLibrary.MYSQL));
checkConcatFunc(f.withLibrary(SqlLibrary.POSTGRESQL));
checkConcatFunc(f.withLibrary(SqlLibrary.BIG_QUERY));
checkConcat2Func(f.withLibrary(SqlLibrary.ORACLE));
}

Expand Down

0 comments on commit 12e9ad4

Please sign in to comment.