Skip to content

Commit 65a31c1

Browse files
committed
[doc](function)support isnull and isnotnull function
1 parent 12a3cd7 commit 65a31c1

File tree

5 files changed

+299
-1
lines changed

5 files changed

+299
-1
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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+
```
64+
65+
```sql
66+
SELECT NULL ISNOTNULL;
67+
```
68+
69+
```text
70+
+----------------+
71+
| NULL ISNOTNULL |
72+
+----------------+
73+
| 0 |
74+
+----------------+
75+
```
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
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+
```
62+
63+
```sql
64+
SELECT NULL ISNULL;
65+
```
66+
67+
```text
68+
+-------------+
69+
| NULL ISNULL |
70+
+-------------+
71+
| 1 |
72+
+-------------+
73+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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+
```
64+
65+
```sql
66+
SELECT NULL ISNOTNULL;
67+
```
68+
69+
```text
70+
+----------------+
71+
| NULL ISNOTNULL |
72+
+----------------+
73+
| 0 |
74+
+----------------+
75+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
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+
```
62+
63+
```sql
64+
SELECT NULL ISNULL;
65+
```
66+
67+
```text
68+
+-------------+
69+
| NULL ISNULL |
70+
+-------------+
71+
| 1 |
72+
+-------------+
73+
```

sidebars.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1517,6 +1517,8 @@
15171517
"sql-manual/sql-functions/scalar-functions/conditional-functions/not-null-or-empty",
15181518
"sql-manual/sql-functions/scalar-functions/conditional-functions/ifnull",
15191519
"sql-manual/sql-functions/scalar-functions/conditional-functions/nullif",
1520+
"sql-manual/sql-functions/scalar-functions/conditional-functions/isnull",
1521+
"sql-manual/sql-functions/scalar-functions/conditional-functions/isnotnull",
15201522
"sql-manual/sql-functions/scalar-functions/conditional-functions/greatest",
15211523
"sql-manual/sql-functions/scalar-functions/conditional-functions/least"
15221524
]
@@ -2208,4 +2210,4 @@
22082210
]
22092211
}
22102212
]
2211-
}
2213+
}

0 commit comments

Comments
 (0)