Skip to content

Commit

Permalink
[FLINK-31362][table] Upgrade Calcite to 1.33.0
Browse files Browse the repository at this point in the history
This closes apache#24255
  • Loading branch information
snuyanzin committed Nov 15, 2024
1 parent 3d17cac commit 77e7ac0
Show file tree
Hide file tree
Showing 42 changed files with 4,493 additions and 500 deletions.
75 changes: 38 additions & 37 deletions docs/content.zh/docs/dev/table/functions/systemFunctions.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,43 +118,44 @@ JSON 函数使用符合 ISO/IEC TR 19075-6 SQL标准的 JSON 路径表达式。
下表列出了时间间隔单位和时间点单位标识符。

对于 Table API,请使用 `_` 代替空格(例如 `DAY_TO_HOUR`)。

| 时间间隔单位 | 时间点单位 |
| :------------------------ | :------------------------------ |
| `MILLENNIUM` | |
| `CENTURY` | |
| `DECADE` | |
| `YEAR` | `YEAR` |
| `YEAR TO MONTH` | |
| `QUARTER` | `QUARTER` |
| `MONTH` | `MONTH` |
| `WEEK` | `WEEK` |
| `DAY` | `DAY` |
| `DAY TO HOUR` | |
| `DAY TO MINUTE` | |
| `DAY TO SECOND` | |
| `HOUR` | `HOUR` |
| `HOUR TO MINUTE` | |
| `HOUR TO SECOND` | |
| `MINUTE` | `MINUTE` |
| `MINUTE TO SECOND` | |
| `SECOND` | `SECOND` |
| `MILLISECOND` | `MILLISECOND` |
| `MICROSECOND` | `MICROSECOND` |
| `NANOSECOND` | |
| `EPOCH` | |
| `DOY` _(仅适用SQL)_ | |
| `DOW` _(仅适用SQL)_ | |
| `ISODOW` _(仅适用SQL)_ | |
| `ISOYEAR` _(仅适用SQL)_ | |
| | `SQL_TSI_YEAR` _(仅适用SQL)_ |
| | `SQL_TSI_QUARTER` _(仅适用SQL)_ |
| | `SQL_TSI_MONTH` _(仅适用SQL)_ |
| | `SQL_TSI_WEEK` _(仅适用SQL)_ |
| | `SQL_TSI_DAY` _(仅适用SQL)_ |
| | `SQL_TSI_HOUR` _(仅适用SQL)_ |
| | `SQL_TSI_MINUTE` _(仅适用SQL)_ |
| | `SQL_TSI_SECOND ` _(仅适用SQL)_ |
Plural works for SQL only.

| 时间间隔单位 | 时间点单位 |
|:-------------------------|:-----------------------------|
| `MILLENNIUM` | |
| `CENTURY` | |
| `DECADE` | |
| `YEAR(S)` | `YEAR` |
| `YEAR(S) TO MONTH(S)` | |
| `QUARTER(S)` | `QUARTER` |
| `MONTH(S)` | `MONTH` |
| `WEEK(S)` | `WEEK` |
| `DAY(S)` | `DAY` |
| `DAY(S) TO HOUR(S)` | |
| `DAY(S) TO MINUTE(S)` | |
| `DAY(S) TO SECOND(S)` | |
| `HOUR(S)` | `HOUR` |
| `HOUR(S) TO MINUTE(S)` | |
| `HOUR(S) TO SECOND(S)` | |
| `MINUTE(S)` | `MINUTE` |
| `MINUTE(S) TO SECOND(S)` | |
| `SECOND(S)` | `SECOND` |
| `MILLISECOND` | `MILLISECOND` |
| `MICROSECOND` | `MICROSECOND` |
| `NANOSECOND` | |
| `EPOCH` | |
| `DOY` _(仅适用SQL)_ | |
| `DOW` _(仅适用SQL)_ | |
| `ISODOW` _(仅适用SQL)_ | |
| `ISOYEAR` _(仅适用SQL)_ | |
| | `SQL_TSI_YEAR` _(仅适用SQL)_ |
| | `SQL_TSI_QUARTER` _(仅适用SQL)_ |
| | `SQL_TSI_MONTH` _(仅适用SQL)_ |
| | `SQL_TSI_WEEK` _(仅适用SQL)_ |
| | `SQL_TSI_DAY` _(仅适用SQL)_ |
| | `SQL_TSI_HOUR` _(仅适用SQL)_ |
| | `SQL_TSI_MINUTE` _(仅适用SQL)_ |
| | `SQL_TSI_SECOND ` _(仅适用SQL)_ |

{{< top >}}

Expand Down
15 changes: 15 additions & 0 deletions docs/content.zh/docs/dev/table/sql/queries/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,21 @@ Flink SQL> SELECT 'Hello World', 'It''s me';
- 使用反斜杠(`\`)作为转义字符 (默认):`SELECT U&'\263A'`
- 使用自定义的转义字符:`SELECT U&'#263A' UESCAPE '#'`

Starting Flink 2.0 there is C-style escape available

| Backslash Escape Sequence | Interpretation |
|:----------------------------------|:--------------------------------------------------|
| \b | backspace |
| \f | form feed |
| \n | newline |
| \r | carriage return |
| \t | tab |
| \o, \oo, \ooo (o = 0–7) | octal byte value |
| \xh, \xhh (h = 0–9, A–F) | hexadecimal byte value |
| \uxxxx, \Uxxxxxxxx (x = 0–9, A–F) | 16 or 32-bit hexadecimal Unicode character value |

Example: `SELECT e'\u0061\x61\141' AS c` or `SELECT E'\u0061\x61\141' AS c`;

{{< top >}}

## 操作
Expand Down
31 changes: 16 additions & 15 deletions docs/content/docs/dev/table/functions/systemFunctions.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,27 +121,28 @@ Time Interval and Point Unit Specifiers
The following table lists specifiers for time interval and time point units.

For Table API, please use `_` for spaces (e.g., `DAY_TO_HOUR`).
Plural works for SQL only.

| Time Interval Unit | Time Point Unit |
|:-------------------------|:-------------------------------|
| `MILLENNIUM` | |
| `CENTURY` | |
| `DECADE` | |
| `YEAR` | `YEAR` |
| `YEAR TO MONTH` | |
| `QUARTER` | `QUARTER` |
| `MONTH` | `MONTH` |
| `WEEK` | `WEEK` |
| `DAY` | `DAY` |
| `DAY TO HOUR` | |
| `DAY TO MINUTE` | |
| `DAY TO SECOND` | |
| `HOUR` | `HOUR` |
| `HOUR TO MINUTE` | |
| `HOUR TO SECOND` | |
| `MINUTE` | `MINUTE` |
| `MINUTE TO SECOND` | |
| `SECOND` | `SECOND` |
| `YEAR(S)` | `YEAR` |
| `YEAR(S) TO MONTH(S)` | |
| `QUARTER(S)` | `QUARTER` |
| `MONTH(S)` | `MONTH` |
| `WEEK(S)` | `WEEK` |
| `DAY(S)` | `DAY` |
| `DAY(S) TO HOUR(S)` | |
| `DAY(S) TO MINUTE(S)` | |
| `DAY(S) TO SECOND(S)` | |
| `HOUR(S)` | `HOUR` |
| `HOUR(S) TO MINUTE(S)` | |
| `HOUR(S) TO SECOND(S)` | |
| `MINUTE(S)` | `MINUTE` |
| `MINUTE(S) TO SECOND(S)` | |
| `SECOND(S)` | `SECOND` |
| `MILLISECOND` | `MILLISECOND` |
| `MICROSECOND` | `MICROSECOND` |
| `NANOSECOND` | |
Expand Down
15 changes: 15 additions & 0 deletions docs/content/docs/dev/table/sql/queries/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,21 @@ Unicode characters are supported in string literals. If explicit unicode code po
- Use the backslash (`\`) as escaping character (default): `SELECT U&'\263A'`
- Use a custom escaping character: `SELECT U&'#263A' UESCAPE '#'`

Starting Flink 2.0 there is C-style escape available

| Backslash Escape Sequence | Interpretation |
|:----------------------------------|:--------------------------------------------------|
| \b | backspace |
| \f | form feed |
| \n | newline |
| \r | carriage return |
| \t | tab |
| \o, \oo, \ooo (o = 0–7) | octal byte value |
| \xh, \xhh (h = 0–9, A–F) | hexadecimal byte value |
| \uxxxx, \Uxxxxxxxx (x = 0–9, A–F) | 16 or 32-bit hexadecimal Unicode character value |

Example: `SELECT e'\u0061\x61\141' AS c` or `SELECT E'\u0061\x61\141' AS c`;

{{< top >}}

## Operations
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/dev/table/sql/queries/select.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The general syntax of the `SELECT` statement is:
SELECT select_list FROM table_expression [ WHERE boolean_expression ]
```

The `table_expression` refers to any source of data. It could be an existing table, view, or `VALUES` clause, the joined results of multiple existing tables, or a subquery. Assuming that the table is available in the catalog, the following would read all rows from `Orders`.
The `table_expression` refers to any source of data. It could be an existing table, view, `VALUES`, or `VALUE` clause, the joined results of multiple existing tables, or a subquery. Assuming that the table is available in the catalog, the following would read all rows from `Orders`.

```sql
SELECT * FROM Orders
Expand Down
9 changes: 5 additions & 4 deletions flink-table/flink-sql-parser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,13 @@ under the License.
<version>${calcite.version}</version>
<exclusions>
<!--
"mvn dependency:tree" as of Calcite 1.32.0:
"mvn dependency:tree" as of Calcite 1.33.0:
[INFO] +- org.apache.calcite:calcite-core:jar:1.32.0:compile
[INFO] | +- org.apache.calcite.avatica:avatica-core:jar:1.22.0:compile
[INFO] +- org.apache.calcite:calcite-core:jar:1.33.0:compile
[INFO] | +- org.apache.calcite.avatica:avatica-core:jar:1.23.0:compile
[INFO] | +- org.apiguardian:apiguardian-api:jar:1.1.2:compile
[INFO] | \- org.checkerframework:checker-qual:jar:3.12.0:compile
[INFO] | +- org.checkerframework:checker-qual:jar:3.12.0:compile
[INFO] | \- org.apache.commons:commons-math3:jar:3.6.1:runtime
Dependencies that are not needed for how we use Calcite right now.
-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -708,4 +708,5 @@
includeCompoundIdentifier: true
includeBraces: true
includeAdditionalDeclarations: false
includeParsingStringLiteralAsArrayLiteral: false
}
Loading

0 comments on commit 77e7ac0

Please sign in to comment.