This is an automated email from the ASF dual-hosted git repository.
mbudiu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/calcite.git
The following commit(s) were added to refs/heads/main by this push:
new 481d6acb4d [CALCITE-6222] Mysql does not have to_char function
481d6acb4d is described below
commit 481d6acb4dd3479d864bc82120be73d7c96a1673
Author: caicancai <[email protected]>
AuthorDate: Thu Jan 25 00:01:58 2024 +0800
[CALCITE-6222] Mysql does not have to_char function
---
core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java | 2 +-
site/_docs/reference.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git
a/core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java
b/core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java
index 265084c4f6..02184cab92 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java
@@ -1585,7 +1585,7 @@ public abstract class SqlLibraryOperators {
/** The "TO_CHAR(timestamp, format)" function;
* converts {@code timestamp} to string according to the given {@code
format}.
*/
- @LibraryOperator(libraries = {MYSQL, ORACLE, POSTGRESQL})
+ @LibraryOperator(libraries = {ORACLE, POSTGRESQL})
public static final SqlFunction TO_CHAR =
SqlBasicFunction.create("TO_CHAR",
ReturnTypes.VARCHAR_2000,
diff --git a/site/_docs/reference.md b/site/_docs/reference.md
index 1ba228d312..a2cc0c5773 100644
--- a/site/_docs/reference.md
+++ b/site/_docs/reference.md
@@ -2861,7 +2861,7 @@ In the following:
| b | TIME_DIFF(time, time2, timeUnit) | Returns the whole
number of *timeUnit* between *time* and *time2*
| b | TIME_SUB(time, interval) | Returns the TIME value
that is *interval* before *time*
| b | TIME_TRUNC(time, timeUnit) | Truncates *time* to the
granularity of *timeUnit*, rounding to the beginning of the unit
-| m o p | TO_CHAR(timestamp, format) | Converts *timestamp* to
a string using the format *format*
+| o p | TO_CHAR(timestamp, format) | Converts *timestamp* to a
string using the format *format*
| b | TO_CODE_POINTS(string) | Converts *string* to an
array of integers that represent code points or extended ASCII character values
| o p | TO_DATE(string, format) | Converts *string* to a
date using the format *format*
| o p | TO_TIMESTAMP(string, format) | Converts *string* to a
timestamp using the format *format*