Skip to content

Commit

Permalink
Merge pull request #1165 from yangj1211/load_file
Browse files Browse the repository at this point in the history
add limit tto load_file
  • Loading branch information
yangj1211 authored Nov 14, 2024
2 parents bc6e053 + 6434048 commit 76078aa
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

`LOAD_FILE()` 函数用于读取 datalink 类型指向文件的内容。

!!! note
当使用 load_file() 加载大文件时,若文件数据量过大,可能会超出系统内存限制,导致内存溢出。建议结合 [DATALINK](../../Data-Types/datalink-type.md)`offset``size` 使用。

## **函数语法**

```
Expand All @@ -16,7 +19,7 @@
| ---- | ---- |
| datalink_type_data | datalink 类型数据,可以使用[cast()](../../../Reference/Operators/operators/cast-functions-and-operators/cast/)函数进行转换|

## 示例
## **示例**

`/Users/admin/case` 下有文件 `t1.csv`

Expand Down Expand Up @@ -69,4 +72,4 @@ mysql> select load_file(cast('stage://stage1//t1.csv' as datalink));
|
+-----------------------------------------------------+
1 row in set (0.00 sec)
```
```

0 comments on commit 76078aa

Please sign in to comment.