Skip to content

Commit 7586162

Browse files
authored
[fix] Fix data type and sql function- agg function (#1713)
## Versions - [x] dev - [x] 3.0 - [x] 2.1 - [ ] 2.0 ## Languages - [ ] Chinese - [ ] English ## Docs Checklist - [ ] Checked by AI - [ ] Test Cases Built
1 parent 69d71fc commit 7586162

File tree

2,923 files changed

+8670
-8782
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,923 files changed

+8670
-8782
lines changed

i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-contribute/contribute-doc.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,11 +452,11 @@ under the License.
452452

453453
SHOW ALTER
454454

455-
### Description
455+
## 描述
456456

457457
(描述命令语法。)
458458

459-
### Example
459+
## 举例
460460

461461
(提供命令示例。)
462462

i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-data-types/aggregate/AGG-STATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ under the License.
2525
-->
2626

2727
## AGG_STATE
28-
### description
28+
## 描述
2929
AGG_STATE不能作为key列使用,建表时需要同时声明聚合函数的签名。
3030
用户不需要指定长度和默认值。实际存储的数据大小与函数实现有关。
3131

@@ -37,7 +37,7 @@ under the License.
3737

3838
**注意: 因为`agg_state`存储的是聚合函数的中间结果,所以读写过程都强依赖于聚合函数的具体实现,如果在Doris版本升级时对聚合函数实现做了修改,则可能会造成不兼容的情况。如果出现不兼容的情况,使用到对应`agg_state`的物化视图需要`drop`并重新创建,另外涉及到的基础聚合表则会直接不可用,所以需要慎重使用`agg_state`**
3939

40-
### example
40+
## 举例
4141

4242
建表示例如下:
4343
```sql

i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-data-types/aggregate/BITMAP.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ under the License.
2525
-->
2626

2727
## BITMAP
28-
### description
28+
## 描述
2929
BITMAP
3030

3131
BITMAP 类型的列可以在 Aggregate 表、Unique 表或 Duplicate 表中使用。
@@ -37,7 +37,7 @@ BITMAP 类型的列可以在 Aggregate 表、Unique 表或 Duplicate 表中使
3737
离线场景下使用 BITMAP 会影响导入速度,在数据量大的情况下查询速度会慢于 HLL,并优于 Count Distinct。
3838
注意:实时场景下 BITMAP 如果不使用全局字典,使用了 bitmap_hash() 可能会导致有千分之一左右的误差。如果这个误差不可接受,可以使用 bitmap_hash64。
3939

40-
### example
40+
## 举例
4141

4242
建表示例如下:
4343

i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-data-types/aggregate/HLL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ under the License.
2525
-->
2626

2727
## HLL(HyperLogLog)
28-
### description
28+
## 描述
2929
HLL
3030
HLL 不能作为 key 列使用,支持在 Aggregate 模型、Duplicate 模型和 Unique 模型的表中使用。在 Aggregate 模型表中使用时,建表时配合的聚合类型为 HLL_UNION。
3131
用户不需要指定长度和默认值。长度根据数据的聚合程度系统内控制。
@@ -34,7 +34,7 @@ HLL 不能作为 key 列使用,支持在 Aggregate 模型、Duplicate 模型
3434
HLL 是模糊去重,在数据量大的情况性能优于 Count Distinct。
3535
HLL 的误差通常在 1% 左右,有时会达到 2%。
3636

37-
### example
37+
## 举例
3838

3939
select hour, HLL_UNION_AGG(pv) over(order by hour) uv from(
4040
select hour, HLL_RAW_AGG(device_id) as pv

i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-data-types/aggregate/QUANTILE-STATE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ under the License.
2525
-->
2626

2727
## QUANTILE_STATE
28-
### description
28+
## 描述
2929
QUANTILE_STATE
3030

3131
**在 2.0 中我们支持了[agg_state](AGG_STATE.md)功能,推荐使用 agg_state quantile_union(quantile_state not null) 来代替本类型。**
@@ -52,11 +52,11 @@ QUANTILE_STATE 是一种计算分位数近似值的类型,在导入时会对
5252

5353

5454

55-
### example
55+
## 举例
5656
select QUANTILE_PERCENT(QUANTILE_UNION(v1), 0.5) from test_table group by k1, k2, k3;
5757

5858

59-
### notice
59+
## 注意事项
6060

6161
使用前可以通过如下命令打开 QUANTILE_STATE 开关:
6262

i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-data-types/date-time/DATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ under the License.
3030

3131
DATE
3232

33-
### description
33+
## 描述
3434
DATE类型
3535
日期类型,目前的取值范围是['0000-01-01', '9999-12-31'], 默认的打印形式是'yyyy-MM-dd'
3636

37-
### example
37+
## 举例
3838

3939
```sql
4040
SELECT DATE('2003-12-31 01:02:03');

i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-data-types/date-time/DATETIME.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ under the License.
2828

2929
DATETIMEV2
3030

31-
### description
31+
## 描述
3232

3333
DATETIME([P])
3434
日期时间类型,可选参数 P 表示时间精度,取值范围是[0, 6],即最多支持 6 位小数(微秒)。不设置时为 0。
@@ -47,7 +47,7 @@ DATETIME 读入时支持解析时区,格式为原本 DATETIME 字面量后紧
4747

4848
关于`<timezone>`的具体支持格式,请见[时区](../../../admin-manual/cluster-management/time-zone)。需要注意的是,`DATE`, `DATEV2`, `DATETIME`, `DATETIMEV2` 类型均****包含时区信息。例如,一个输入的时间字符串 "2012-12-12 08:00:00+08:00" 经解析并转换至当前时区 "+02:00",得到实际值 "2012-12-12 02:00:00" 后存储于 DATETIME 列中,则之后无论本集群环境变量如何改变,该值本身都不会发生变化。
4949

50-
### example
50+
## 举例
5151

5252
```sql
5353
mysql> select @@time_zone;

i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-data-types/date-time/TIME.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ under the License.
3030

3131
TIME
3232

33-
### description
33+
## 描述
3434

3535
TIME 类型
3636
时间类型,可以作为查询结果出现,暂时不支持建表存储。表示范围为 `[-838:59:59, 838:59:59]`
3737
当前 Doris 中,TIME 作为计算结果的正确性是有保证的(如 `timediff` 等函数),但**不推荐手动 CAST 产生 TIME 类型**
3838
TIME 类型不会在常量折叠中进行计算。
3939

40-
### example
40+
## 举例
4141

4242
```sql
4343
mysql> select timediff('2020-01-01 12:05:03', '2020-01-01 08:02:15');

i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-data-types/ip/IPV4.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ under the License.
2626

2727
## IPV4
2828

29-
### description
29+
## 描述
3030

3131
IPv4 类型,以 UInt32 的形式存储在 4 个字节中,用于表示 IPv4 地址。
3232
取值范围是 ['0.0.0.0', '255.255.255.255']
3333

3434
`超出取值范围或者格式非法的输入将返回NULL`
3535

36-
### example
36+
## 举例
3737

3838
建表示例如下:
3939

i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-data-types/ip/IPV6.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ under the License.
2626

2727
## IPV6
2828

29-
### description
29+
## 描述
3030

3131
IPv6 类型,以 UInt128 的形式存储在 16 个字节中,用于表示 IPv6 地址。
3232
取值范围是 ['::', 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff']
3333

3434
`超出取值范围或者格式非法的输入将返回NULL`
3535

36-
### example
36+
## 举例
3737

3838
建表示例如下:
3939

0 commit comments

Comments
 (0)