Skip to content

Commit

Permalink
add the function directory
Browse files Browse the repository at this point in the history
  • Loading branch information
nicecui committed Jul 10, 2024
1 parent 4562a81 commit 5be7a0a
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/nightly/en/faq-and-others/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Of course, please use the `compact_table` function:
select compact_table("test");
```

There are many [administration functions](/reference/sql/functions#admin-functions) for database management.
There are many [administration functions](/reference/sql/functions/overview#admin-functions) for database management.

### Can GreptimeDB be used to store logs?

Expand Down
2 changes: 1 addition & 1 deletion docs/nightly/en/reference/sql/functions/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ select database();
GreptimeDB provides some administration functions to manage the database and data:

* `flush_table(table_name)` to flush a table's memtables into SST file by table name.
* `flush_region(region_id)` to flush a region's memtables into SST file by region id. Find the region id through [PARTITIONS](./information-schema/partitions.md) table.
* `flush_region(region_id)` to flush a region's memtables into SST file by region id. Find the region id through [PARTITIONS](../information-schema/partitions.md) table.
* `compact_table(table_name)` to schedule a compaction task for a table by table name.
* `compact_region(region_id)` to schedule a compaction task for a region by region id.
* `migrate_region(region_id, from_peer, to_peer, [timeout])` to migrate regions between datanodes, please read the [Region Migration](/user-guide/operations/region-migration).
Expand Down
2 changes: 1 addition & 1 deletion docs/nightly/en/reference/sql/group_by.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ FROM system_metrics
GROUP BY dt
```

Please refer to [date_trunc](./functions.md#date_trunc) for more details.
Please refer to [date_trunc](./functions/overview.md#date_trunc) for more details.
2 changes: 1 addition & 1 deletion docs/nightly/en/reference/sql/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* [GROUP BY](./group_by.md)
* [LIMIT](./limit.md)
* [JOIN](./join.md)
* [Functions](./functions.md)
* [Functions](./functions/overview.md)
* [DELETE](./delete.md)
* [SHOW](./show.md)
* [TQL](./tql.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/nightly/en/reference/sql/range.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ INTERVAL := TIME_INTERVAL | ( INTERVAL expr )
- Subkeyword `BY`, optional field, followed by parameter `(columna, columnb,..)`, describes the aggregate key. For legal `BY_OPTION` parameters, see [BY Option](#by-option).
- The parameter `INTERVAL` is mainly used to give the length of a period of time. There are two parameter forms:
- Strings based on the `PromQL Time Durations` format (eg: `3h`, `1h30m`). Visit the [Prometheus documentation](https://prometheus.io/docs/prometheus/latest/querying/basics/#time-durations) for a more detailed description of this format.
- `Interval` type. To use the `Interval` type, you need to carry parentheses, (for example: `(INTERVAL '1 year 3 hours 20 minutes')`). Visit [Interval](./functions.md#interval) for a more detailed description of this format.
- `Interval` type. To use the `Interval` type, you need to carry parentheses, (for example: `(INTERVAL '1 year 3 hours 20 minutes')`). Visit [Interval](./functions/overview.md#interval) for a more detailed description of this format.
- `AGGR_FUNCTION(column1, column2,..) RANGE INTERVAL [FILL FILL_OPTION]` is called a Range expression.
- `AGGR_FUNCTION(column1, column2,..)` is an aggregate function that represents the expression that needs to be aggregated.
- Keyword `RANGE`, required field, followed by parameter `INTERVAL` specifies the time range of each data aggregation.
Expand Down
2 changes: 1 addition & 1 deletion docs/nightly/en/user-guide/operations/admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The `INFORMATION_SCHEMA` database provides access to system metadata, such as th

* [The Storage Location](/user-guide/concepts/storage-location.md).
* Cluster Failover for GreptimeDB by [Setting Remote WAL](./remote-wal/quick-start.md).
* [Flush and Compaction for Table & Region](/reference/sql/functions#admin-functions).
* [Flush and Compaction for Table & Region](/reference/sql/functions/overview#admin-functions).
* Partition the table by regions, read the [Table Sharding](/contributor-guide/frontend/table-sharding.md) reference.
* [Migrate the Region](./region-migration.md) for Load Balance.
* [Expire Data by Setting TTL](/user-guide/concepts/features-that-you-concern#can-i-set-ttl-or-retention-policy-for-different-tables-or-measurements).
Expand Down
4 changes: 2 additions & 2 deletions docs/nightly/en/user-guide/query-data/sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ select to_unixtime('2024-01-02 00:00:00');
select to_unixtime('2024-01-02 00:00:00+08:00');
```

Please refer to [SELECT](/reference/sql/select.md) and [Functions](/reference/sql/functions.md) for more information.
Please refer to [SELECT](/reference/sql/select.md) and [Functions](/reference/sql/functions/overview.md) for more information.

## Limit the number of rows returned

Expand Down Expand Up @@ -165,7 +165,7 @@ For example, use the `now()` function and the `INTERVAL` keyword to retrieve dat
SELECT * FROM monitor WHERE ts >= now() - INTERVAL '5 minutes';
```

For date and time functions, please refer to [Functions](/reference/sql/functions.md) for more information.
For date and time functions, please refer to [Functions](/reference/sql/functions/overview.md) for more information.

### Time zone

Expand Down
2 changes: 1 addition & 1 deletion docs/nightly/zh/faq-and-others/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Of course, please use the `compact_table` function:
select compact_table("test");
```

There are many [administration functions](/reference/sql/functions#admin-functions) for database management.
There are many [administration functions](/reference/sql/functions/overview#admin-functions) for database management.

### Can GreptimeDB be used to store logs?

Expand Down
2 changes: 1 addition & 1 deletion docs/nightly/zh/reference/sql/functions/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ select database();
GreptimeDB 提供一些管理数据库和数据的函数:

* `flush_table(table_name)` 通过表名将表的内存表刷写到 SST 文件。
* `flush_region(region_id)` 通过 Region Id 将 Region 的内存表刷写到 SST 文件。可以通过 [PARTITIONS](./information-schema/partitions.md) 表查找一张表的所有 Region Id。
* `flush_region(region_id)` 通过 Region Id 将 Region 的内存表刷写到 SST 文件。可以通过 [PARTITIONS](../information-schema/partitions.md) 表查找一张表的所有 Region Id。
* `compact_table(table_name)` 通过表名为表发起compaction 任务。
* `compact_region(region_id)` 通过 Region Id 为 Region 发起 compaction 任务。
* `migrate_region(region_id, from_peer, to_peer, [timeout])` 在 Datanode 之间迁移 Region,请阅读 [ Region迁移](/user-guide/operations/region-migration)
Expand Down
2 changes: 1 addition & 1 deletion docs/nightly/zh/reference/sql/group_by.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ FROM system_metrics
GROUP BY dt
```

请参考 [date_trunc](./functions.md#date_trunc) 获取更多信息。
请参考 [date_trunc](./functions/overview.md#date_trunc) 获取更多信息。
2 changes: 1 addition & 1 deletion docs/nightly/zh/reference/sql/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* [GROUP BY](./group_by.md)
* [LIMIT](./limit.md)
* [JOIN](./join.md)
* [Functions](./functions.md)
* [Functions](./functions/overview.md)
* [DELETE](./delete.md)
* [SHOW](./show.md)
* [TQL](./tql.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/nightly/zh/reference/sql/range.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ INTERVAL := TIME_INTERVAL | ( INTERVAL expr )
- 子关键字 `BY` ,可选字段,后接参数 `(columna, columnb,..)` ,描述了聚合键。详情请见[BY OPTION](#by-option)
- 参数 `INTERVAL` ,主要用于给出一段时间长度,有两种参数形式:
- 基于 `PromQL Time Durations` 格式的字符串(例如:`3h``1h30m`)。访问 [Prometheus 文档](https://prometheus.io/docs/prometheus/latest/querying/basics/#time-durations) 获取该格式更详细的说明。
- `Interval` 类型,使用 `Interval` 类型需要携带括号,(例如:`(INTERVAL '1 year 3 hours 20 minutes')`)。访问 [Interval](./functions.md#interval) 获取该格式更详细的说明。
- `Interval` 类型,使用 `Interval` 类型需要携带括号,(例如:`(INTERVAL '1 year 3 hours 20 minutes')`)。访问 [Interval](./functions/overview.md#interval) 获取该格式更详细的说明。
- `AGGR_FUNCTION(column1, column2,..) RANGE INTERVAL [FILL FILL_OPTION]` 称为一个 Range 表达式。
- `AGGR_FUNCTION(column1, column2,..)` 是一个聚合函数,代表需要聚合的表达式。
- 关键字 `RANGE`,必选字段,后接参数 `INTERVAL` 指定了每次数据聚合的时间范围,
Expand Down
1 change: 1 addition & 0 deletions docs/nightly/zh/summary-i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Migrate-to-GreptimeDB: 迁移到 GreptimeDB
Migrate-to-GreptimeCloud: 迁移到 GreptimeCloud
Integrations: 集成
Usage-&-Billing: 用量及费用
Functions: 函数
Frontend: Frontend
Datanode: Datanode
Flownode: Flownode
Expand Down
2 changes: 1 addition & 1 deletion docs/nightly/zh/user-guide/operations/admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ORDER BY datanode_id ASC

* [存储位置说明](/user-guide/concepts/storage-location.md)
* 通过 [设置Remote WAL](./remote-wal/quick-start.md) 实现 GreptimeDB 的集群容灾。
* [Table 和 Region 的 Flush 和 Compaction](/reference/sql/functions#admin-functions)
* [Table 和 Region 的 Flush 和 Compaction](/reference/sql/functions/overview#admin-functions)
* 通过 Region 对表进行分区,请阅读 [表的分片](/contributor-guide/frontend/table-sharding.md) 参考。
* [迁移 Region](./region-migration.md) 以实现负载均衡。
* [通过设置 TTL 过期数据](/user-guide/concepts/features-that-you-concern#can-i-set-ttl-or-retention-policy-for-different-tables-or-measurements)
Expand Down
4 changes: 2 additions & 2 deletions docs/nightly/zh/user-guide/query-data/sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ select to_unixtime('2024-01-02 00:00:00');
select to_unixtime('2024-01-02 00:00:00+08:00');
```

请参考 [SELECT](/reference/sql/select.md)[Functions](/reference/sql/functions.md) 获取更多信息。
请参考 [SELECT](/reference/sql/select.md)[Functions](/reference/sql/functions/overview.md) 获取更多信息。

## 限制返回的行数

Expand Down Expand Up @@ -155,7 +155,7 @@ SELECT * FROM monitor WHERE ts > '2022-07-25 10:32:16.408';
SELECT * FROM monitor WHERE ts >= now() - INTERVAL '5 minutes';
```

请参考 [Functions](/reference/sql/functions.md) 获取更多时间函数信息。
请参考 [Functions](/reference/sql/functions/overview.md) 获取更多时间函数信息。

### 时区

Expand Down

0 comments on commit 5be7a0a

Please sign in to comment.