Skip to content

Commit 75f75ee

Browse files
committed
[docs](function)support isnull and isnotnull function
1 parent 12a3cd7 commit 75f75ee

File tree

13 files changed

+773
-1
lines changed

13 files changed

+773
-1
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
{
3+
"title": "ISNOTNULL",
4+
"language": "en"
5+
}
6+
7+
---
8+
9+
<!--
10+
Licensed to the Apache Software Foundation (ASF) under one
11+
or more contributor license agreements. See the NOTICE file
12+
distributed with this work for additional information
13+
regarding copyright ownership. The ASF licenses this file
14+
to you under the Apache License, Version 2.0 (the
15+
"License"); you may not use this file except in compliance
16+
with the License. You may obtain a copy of the License at
17+
18+
http://www.apache.org/licenses/LICENSE-2.0
19+
20+
Unless required by applicable law or agreed to in writing,
21+
software distributed under the License is distributed on an
22+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23+
KIND, either express or implied. See the License for the
24+
specific language governing permissions and limitations
25+
under the License.
26+
-->
27+
28+
## Description
29+
30+
Returns `bool` if the expression is not `NULL`.
31+
32+
33+
34+
## Syntax
35+
36+
```sql
37+
ISNOTNULL(<expr>)
38+
```
39+
40+
## Parameters
41+
42+
| Parameter | Description |
43+
| --------- | --------------------------------------- |
44+
| `<expr>` | The expression to check for not `NULL`. |
45+
| | |
46+
47+
## Return Value
48+
49+
- Returns `bool` if the expression is not `NULL`.
50+
51+
## Examples
52+
53+
```sql
54+
SELECT ISNOTNULL(NULL);
55+
```
56+
57+
```text
58+
+-----------------+
59+
| ISNOTNULL(NULL) |
60+
+-----------------+
61+
| 0 |
62+
+-----------------+
63+
```
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
{
3+
"title": "ISNULL",
4+
"language": "en"
5+
}
6+
7+
---
8+
9+
<!--
10+
Licensed to the Apache Software Foundation (ASF) under one
11+
or more contributor license agreements. See the NOTICE file
12+
distributed with this work for additional information
13+
regarding copyright ownership. The ASF licenses this file
14+
to you under the Apache License, Version 2.0 (the
15+
"License"); you may not use this file except in compliance
16+
with the License. You may obtain a copy of the License at
17+
18+
http://www.apache.org/licenses/LICENSE-2.0
19+
20+
Unless required by applicable law or agreed to in writing,
21+
software distributed under the License is distributed on an
22+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23+
KIND, either express or implied. See the License for the
24+
specific language governing permissions and limitations
25+
under the License.
26+
-->
27+
28+
## Description
29+
30+
Returns `bool` if the expression is `NULL`.
31+
32+
## Syntax
33+
34+
```sql
35+
ISNULL(<expr>)
36+
```
37+
38+
## Parameters
39+
40+
| Parameter | Description |
41+
| --------- | ----------------------------------- |
42+
| `<expr>` | The expression to check for `NULL`. |
43+
| | |
44+
45+
## Return Value
46+
47+
- Returns `bool` if the expression is `NULL`.
48+
49+
## Examples
50+
51+
```sql
52+
SELECT ISNULL(NULL);
53+
```
54+
55+
```text
56+
+--------------+
57+
| ISNULL(NULL) |
58+
+--------------+
59+
| 1 |
60+
+--------------+
61+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
{
3+
"title": "ISNOTNULL",
4+
"language": "zh-CN"
5+
}
6+
7+
---
8+
9+
<!--
10+
Licensed to the Apache Software Foundation (ASF) under one
11+
or more contributor license agreements. See the NOTICE file
12+
distributed with this work for additional information
13+
regarding copyright ownership. The ASF licenses this file
14+
to you under the Apache License, Version 2.0 (the
15+
"License"); you may not use this file except in compliance
16+
with the License. You may obtain a copy of the License at
17+
18+
http://www.apache.org/licenses/LICENSE-2.0
19+
20+
Unless required by applicable law or agreed to in writing,
21+
software distributed under the License is distributed on an
22+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23+
KIND, either express or implied. See the License for the
24+
specific language governing permissions and limitations
25+
under the License.
26+
-->
27+
28+
## 描述
29+
30+
返回表达式是否不为空的`bool`值。
31+
32+
33+
34+
## 语法
35+
36+
```sql
37+
ISNOTNULL(<expr>)
38+
```
39+
40+
## 参数
41+
42+
| 参数 | 描述 |
43+
| -------- | ---------------------------------- |
44+
| `<expr>` | 需要判断是否不为 `NULL` 的表达式。 |
45+
| | |
46+
47+
## 返回值
48+
49+
- 返回表达式是否不为空的`bool`值。
50+
51+
## 举例
52+
53+
```sql
54+
SELECT ISNOTNULL(NULL);
55+
```
56+
57+
```text
58+
+-----------------+
59+
| ISNOTNULL(NULL) |
60+
+-----------------+
61+
| 0 |
62+
+-----------------+
63+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
{
3+
"title": "ISNULL",
4+
"language": "zh-CN"
5+
}
6+
7+
---
8+
9+
<!--
10+
Licensed to the Apache Software Foundation (ASF) under one
11+
or more contributor license agreements. See the NOTICE file
12+
distributed with this work for additional information
13+
regarding copyright ownership. The ASF licenses this file
14+
to you under the Apache License, Version 2.0 (the
15+
"License"); you may not use this file except in compliance
16+
with the License. You may obtain a copy of the License at
17+
18+
http://www.apache.org/licenses/LICENSE-2.0
19+
20+
Unless required by applicable law or agreed to in writing,
21+
software distributed under the License is distributed on an
22+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23+
KIND, either express or implied. See the License for the
24+
specific language governing permissions and limitations
25+
under the License.
26+
-->
27+
28+
## 描述
29+
30+
返回表达式是否为空的`bool`值。
31+
32+
## 语法
33+
34+
```sql
35+
ISNULL(<expr>)
36+
```
37+
38+
## 参数
39+
40+
| 参数 | 描述 |
41+
| -------- | -------------------------------- |
42+
| `<expr>` | 需要判断是否为 `NULL` 的表达式。 |
43+
| | |
44+
45+
## 返回值
46+
47+
- 返回表达式是否为空的`bool`值。
48+
49+
## 举例
50+
51+
```sql
52+
SELECT ISNULL(NULL);
53+
```
54+
55+
```text
56+
+--------------+
57+
| ISNULL(NULL) |
58+
+--------------+
59+
| 1 |
60+
+--------------+
61+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
{
3+
"title": "ISNOTNULL",
4+
"language": "zh-CN"
5+
}
6+
7+
---
8+
9+
<!--
10+
Licensed to the Apache Software Foundation (ASF) under one
11+
or more contributor license agreements. See the NOTICE file
12+
distributed with this work for additional information
13+
regarding copyright ownership. The ASF licenses this file
14+
to you under the Apache License, Version 2.0 (the
15+
"License"); you may not use this file except in compliance
16+
with the License. You may obtain a copy of the License at
17+
18+
http://www.apache.org/licenses/LICENSE-2.0
19+
20+
Unless required by applicable law or agreed to in writing,
21+
software distributed under the License is distributed on an
22+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23+
KIND, either express or implied. See the License for the
24+
specific language governing permissions and limitations
25+
under the License.
26+
-->
27+
28+
## 描述
29+
30+
返回表达式是否不为空的`bool`值。
31+
32+
33+
34+
## 语法
35+
36+
```sql
37+
ISNOTNULL(<expr>)
38+
```
39+
40+
## 参数
41+
42+
| 参数 | 描述 |
43+
| -------- | ---------------------------------- |
44+
| `<expr>` | 需要判断是否不为 `NULL` 的表达式。 |
45+
| | |
46+
47+
## 返回值
48+
49+
- 返回表达式是否不为空的`bool`值。
50+
51+
## 举例
52+
53+
```sql
54+
SELECT ISNOTNULL(NULL);
55+
```
56+
57+
```text
58+
+-----------------+
59+
| ISNOTNULL(NULL) |
60+
+-----------------+
61+
| 0 |
62+
+-----------------+
63+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
{
3+
"title": "ISNULL",
4+
"language": "zh-CN"
5+
}
6+
7+
---
8+
9+
<!--
10+
Licensed to the Apache Software Foundation (ASF) under one
11+
or more contributor license agreements. See the NOTICE file
12+
distributed with this work for additional information
13+
regarding copyright ownership. The ASF licenses this file
14+
to you under the Apache License, Version 2.0 (the
15+
"License"); you may not use this file except in compliance
16+
with the License. You may obtain a copy of the License at
17+
18+
http://www.apache.org/licenses/LICENSE-2.0
19+
20+
Unless required by applicable law or agreed to in writing,
21+
software distributed under the License is distributed on an
22+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
23+
KIND, either express or implied. See the License for the
24+
specific language governing permissions and limitations
25+
under the License.
26+
-->
27+
28+
## 描述
29+
30+
返回表达式是否为空的`bool`值。
31+
32+
:::info 备注
33+
从 Apache Doris 2.1.10 开始支持该函数
34+
:::
35+
36+
## 语法
37+
38+
```sql
39+
ISNULL(<expr>)
40+
```
41+
42+
## 参数
43+
44+
| 参数 | 描述 |
45+
| -------- | -------------------------------- |
46+
| `<expr>` | 需要判断是否为 `NULL` 的表达式。 |
47+
| | |
48+
49+
## 返回值
50+
51+
- 返回表达式是否为空的`bool`值。
52+
53+
## 举例
54+
55+
```sql
56+
SELECT ISNULL(NULL);
57+
```
58+
59+
```text
60+
+--------------+
61+
| ISNULL(NULL) |
62+
+--------------+
63+
| 1 |
64+
+--------------+
65+
```

0 commit comments

Comments
 (0)