This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 8a42ba5742 [typo](docs) modify bitmap function document (#21721)
8a42ba5742 is described below
commit 8a42ba57428c57f6c37a6826b149f2ab7019ef6a
Author: Euporia <[email protected]>
AuthorDate: Thu Jul 13 14:02:10 2023 +0800
[typo](docs) modify bitmap function document (#21721)
---
.../sql-functions/bitmap-functions/bitmap_and.md | 7 ++++++
.../bitmap-functions/bitmap_and_not.md | 21 +++++++++++++++++
.../sql-functions/bitmap-functions/bitmap_empty.md | 7 ++++++
.../bitmap-functions/bitmap_has_all.md | 26 +++++++++++-----------
.../bitmap-functions/bitmap_has_any.md | 26 +++++++++++-----------
.../bitmap-functions/bitmap_hash64.md | 12 +++++-----
.../sql-functions/bitmap-functions/bitmap_not.md | 20 ++++++++---------
.../sql-functions/bitmap-functions/bitmap_or.md | 25 +++++++++++++--------
.../sql-functions/bitmap-functions/bitmap_and.md | 7 ++++++
.../bitmap-functions/bitmap_and_not.md | 22 ++++++++++++++++++
.../sql-functions/bitmap-functions/bitmap_empty.md | 8 +++++++
.../bitmap-functions/bitmap_has_all.md | 26 +++++++++++-----------
.../bitmap-functions/bitmap_has_any.md | 26 +++++++++++-----------
.../bitmap-functions/bitmap_hash64.md | 12 +++++-----
.../sql-functions/bitmap-functions/bitmap_not.md | 15 +++++++------
.../sql-functions/bitmap-functions/bitmap_or.md | 25 +++++++++++++--------
16 files changed, 186 insertions(+), 99 deletions(-)
diff --git
a/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_and.md
b/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_and.md
index a64a52b570..f17658128a 100644
--- a/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_and.md
+++ b/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_and.md
@@ -42,6 +42,13 @@ mysql> select bitmap_count(bitmap_and(to_bitmap(1),
to_bitmap(2))) cnt;
| 0 |
+------+
+mysql> select bitmap_to_string(bitmap_and(to_bitmap(1), to_bitmap(2)));
++----------------------------------------------------------+
+| bitmap_to_string(bitmap_and(to_bitmap(1), to_bitmap(2))) |
++----------------------------------------------------------+
+| |
++----------------------------------------------------------+
+
mysql> select bitmap_count(bitmap_and(to_bitmap(1), to_bitmap(1))) cnt;
+------+
| cnt |
diff --git
a/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_and_not.md
b/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_and_not.md
index e370ce90b3..b0f13dced1 100644
--- a/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_and_not.md
+++ b/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_and_not.md
@@ -41,6 +41,27 @@ mysql> select
bitmap_count(bitmap_and_not(bitmap_from_string('1,2,3'),bitmap_fro
+------+
| 2 |
+------+
+
+mysql> select
bitmap_to_string(bitmap_and_not(bitmap_from_string('1,2,3'),bitmap_from_string('3,4,5')));
++--------------------------------------------------------------------------------------------+
+| bitmap_to_string(bitmap_and_not(bitmap_from_string('1,2,3'),
bitmap_from_string('3,4,5'))) |
++--------------------------------------------------------------------------------------------+
+| 1,2
|
++--------------------------------------------------------------------------------------------+
+
+mysql> select
bitmap_to_string(bitmap_and_not(bitmap_from_string('1,2,3'),bitmap_empty())) ;
++-------------------------------------------------------------------------------+
+| bitmap_to_string(bitmap_and_not(bitmap_from_string('1,2,3'),
bitmap_empty())) |
++-------------------------------------------------------------------------------+
+| 1,2,3
|
++-------------------------------------------------------------------------------+
+
+mysql> select
bitmap_to_string(bitmap_and_not(bitmap_from_string('1,2,3'),NULL));
++---------------------------------------------------------------------+
+| bitmap_to_string(bitmap_and_not(bitmap_from_string('1,2,3'), NULL)) |
++---------------------------------------------------------------------+
+| NULL |
++---------------------------------------------------------------------+
```
### keywords
diff --git
a/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_empty.md
b/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_empty.md
index 6c5a90ccea..a8b4bbdcc1 100644
--- a/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_empty.md
+++ b/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_empty.md
@@ -45,6 +45,13 @@ mysql> select bitmap_count(bitmap_empty());
+------------------------------+
| 0 |
+------------------------------+
+
+mysql> select bitmap_to_string(bitmap_empty());
++----------------------------------+
+| bitmap_to_string(bitmap_empty()) |
++----------------------------------+
+| |
++----------------------------------+
```
### keywords
diff --git
a/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_has_all.md
b/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_has_all.md
index 7087abf531..a8dc6b19b5 100644
--- a/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_has_all.md
+++ b/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_has_all.md
@@ -36,19 +36,19 @@ Returns true if the second bitmap contains an empty element.
### example
```
-mysql> select bitmap_has_all(bitmap_from_string("0, 1, 2"),
bitmap_from_string("1, 2")) cnt;
-+------+
-| cnt |
-+------+
-| 1 |
-+------+
-
-mysql> select bitmap_has_all(bitmap_empty(), bitmap_from_string("1, 2")) cnt;
-+------+
-| cnt |
-+------+
-| 0 |
-+------+
+mysql> select bitmap_has_all(bitmap_from_string("0, 1, 2"),
bitmap_from_string("1, 2"));
++---------------------------------------------------------------------------+
+| bitmap_has_all(bitmap_from_string('0, 1, 2'), bitmap_from_string('1, 2')) |
++---------------------------------------------------------------------------+
+| 1 |
++---------------------------------------------------------------------------+
+
+mysql> select bitmap_has_all(bitmap_empty(), bitmap_from_string("1, 2"));
++------------------------------------------------------------+
+| bitmap_has_all(bitmap_empty(), bitmap_from_string('1, 2')) |
++------------------------------------------------------------+
+| 0 |
++------------------------------------------------------------+
```
### keywords
diff --git
a/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_has_any.md
b/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_has_any.md
index 4e47b6f343..0466aeb322 100644
--- a/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_has_any.md
+++ b/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_has_any.md
@@ -35,19 +35,19 @@ Calculate whether there are intersecting elements in the
two Bitmap columns. The
### example
```
-mysql> select bitmap_has_any(to_bitmap(1),to_bitmap(2)) cnt;
-+------+
-| cnt |
-+------+
-| 0 |
-+------+
-
-mysql> select bitmap_has_any(to_bitmap(1),to_bitmap(1)) cnt;
-+------+
-| cnt |
-+------+
-| 1 |
-+------+
+mysql> select bitmap_has_any(to_bitmap(1),to_bitmap(2));
++--------------------------------------------+
+| bitmap_has_any(to_bitmap(1), to_bitmap(2)) |
++--------------------------------------------+
+| 0 |
++--------------------------------------------+
+
+mysql> select bitmap_has_any(to_bitmap(1),to_bitmap(1));
++--------------------------------------------+
+| bitmap_has_any(to_bitmap(1), to_bitmap(1)) |
++--------------------------------------------+
+| 1 |
++--------------------------------------------+
```
### keywords
diff --git
a/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_hash64.md
b/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_hash64.md
index e633df9b94..a9a9f03e6d 100644
--- a/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_hash64.md
+++ b/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_hash64.md
@@ -39,12 +39,12 @@ cat data | curl --location-trusted -u user:passwd -T - -H
"columns: dt,page,devi
### example
```
-mysql> select bitmap_count(bitmap_hash64('hello'));
-+------------------------------------+
-| bitmap_count(bitmap_hash64('hello')) |
-+------------------------------------+
-| 1 |
-+------------------------------------+
+mysql> select bitmap_to_string(bitmap_hash64('hello'));
++------------------------------------------+
+| bitmap_to_string(bitmap_hash64('hello')) |
++------------------------------------------+
+| 15231136565543391023 |
++------------------------------------------+
```
### keywords
diff --git
a/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_not.md
b/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_not.md
index 4d26248091..7c4eb833e0 100644
--- a/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_not.md
+++ b/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_not.md
@@ -35,19 +35,19 @@ Calculate the set after lhs minus rhs, return the new
bitmap.
### example
```
-mysql> select
bitmap_count(bitmap_not(bitmap_from_string('2,3'),bitmap_from_string('1,2,3,4')))
cnt;
-+------+
-| cnt |
-+------+
-| 0 |
-+------+
-
-mysql> select
bitmap_to_string(bitmap_not(bitmap_from_string('2,3,5'),bitmap_from_string('1,2,3,4')));
+mysql> select
bitmap_to_string(bitmap_not(bitmap_from_string('2,3'),bitmap_from_string('1,2,3,4')));
+----------------------------------------------------------------------------------------+
-| bitmap_to_string(bitmap_xor(bitmap_from_string('2,3,5'),
bitmap_from_string('1,2,3,4'))) |
+| bitmap_to_string(bitmap_not(bitmap_from_string('2,3'),
bitmap_from_string('1,2,3,4'))) |
+----------------------------------------------------------------------------------------+
-| 5
|
+|
|
+----------------------------------------------------------------------------------------+
+
+mysql> select
bitmap_to_string(bitmap_not(bitmap_from_string('2,3,5'),bitmap_from_string('1,2,3,4')));
++------------------------------------------------------------------------------------------+
+| bitmap_to_string(bitmap_not(bitmap_from_string('2,3,5'),
bitmap_from_string('1,2,3,4'))) |
++------------------------------------------------------------------------------------------+
+| 5
|
++------------------------------------------------------------------------------------------+
```
### keywords
diff --git
a/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_or.md
b/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_or.md
index e5e9be9ac6..6754d8f321 100644
--- a/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_or.md
+++ b/docs/en/docs/sql-manual/sql-functions/bitmap-functions/bitmap_or.md
@@ -35,42 +35,49 @@ Compute union of two or more input bitmaps, returns the new
bitmap.
### example
```
-mysql> select bitmap_count(bitmap_or(to_bitmap(1), to_bitmap(2))) cnt;
+mysql> select bitmap_count(bitmap_or(to_bitmap(1), to_bitmap(1))) cnt;
+------+
| cnt |
+------+
-| 2 |
+| 1 |
+------+
-mysql> select bitmap_count(bitmap_or(to_bitmap(1), to_bitmap(1))) cnt;
+mysql> select bitmap_to_string(bitmap_or(to_bitmap(1), to_bitmap(1))) ;
++---------------------------------------------------------+
+| bitmap_to_string(bitmap_or(to_bitmap(1), to_bitmap(1))) |
++---------------------------------------------------------+
+| 1 |
++---------------------------------------------------------+
+
+mysql> select bitmap_count(bitmap_or(to_bitmap(1), to_bitmap(2))) cnt;
+------+
| cnt |
+------+
-| 1 |
+| 2 |
+------+
-MySQL> select bitmap_to_string(bitmap_or(to_bitmap(1), to_bitmap(2)));
+mysql> select bitmap_to_string(bitmap_or(to_bitmap(1), to_bitmap(2)));
+---------------------------------------------------------+
| bitmap_to_string(bitmap_or(to_bitmap(1), to_bitmap(2))) |
+---------------------------------------------------------+
| 1,2 |
+---------------------------------------------------------+
-MySQL> select bitmap_to_string(bitmap_or(to_bitmap(1), to_bitmap(2),
to_bitmap(10), to_bitmap(0), NULL));
+mysql> select bitmap_to_string(bitmap_or(to_bitmap(1), to_bitmap(2),
to_bitmap(10), to_bitmap(0), NULL));
+--------------------------------------------------------------------------------------------+
| bitmap_to_string(bitmap_or(to_bitmap(1), to_bitmap(2), to_bitmap(10),
to_bitmap(0), NULL)) |
+--------------------------------------------------------------------------------------------+
-| NULL
|
+| 0,1,2,10
|
+--------------------------------------------------------------------------------------------+
-MySQL> select bitmap_to_string(bitmap_or(to_bitmap(1),
to_bitmap(2),to_bitmap(10),to_bitmap(0),bitmap_empty()));
+mysql> select bitmap_to_string(bitmap_or(to_bitmap(1),
to_bitmap(2),to_bitmap(10),to_bitmap(0),bitmap_empty()));
+------------------------------------------------------------------------------------------------------+
| bitmap_to_string(bitmap_or(to_bitmap(1), to_bitmap(2), to_bitmap(10),
to_bitmap(0), bitmap_empty())) |
+------------------------------------------------------------------------------------------------------+
| 0,1,2,10
|
+------------------------------------------------------------------------------------------------------+
-MySQL> select bitmap_to_string(bitmap_or(to_bitmap(10),
bitmap_from_string('1,2'), bitmap_from_string('1,2,3,4,5'))) ;
+mysql> select bitmap_to_string(bitmap_or(to_bitmap(10),
bitmap_from_string('1,2'), bitmap_from_string('1,2,3,4,5'))) ;
+--------------------------------------------------------------------------------------------------------+
| bitmap_to_string(bitmap_or(to_bitmap(10), bitmap_from_string('1,2'),
bitmap_from_string('1,2,3,4,5'))) |
+--------------------------------------------------------------------------------------------------------+
diff --git
a/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_and.md
b/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_and.md
index 9e342842ed..dd237b764f 100644
--- a/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_and.md
+++ b/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_and.md
@@ -42,6 +42,13 @@ mysql> select bitmap_count(bitmap_and(to_bitmap(1),
to_bitmap(2))) cnt;
| 0 |
+------+
+mysql> select bitmap_to_string(bitmap_and(to_bitmap(1), to_bitmap(2)));
++----------------------------------------------------------+
+| bitmap_to_string(bitmap_and(to_bitmap(1), to_bitmap(2))) |
++----------------------------------------------------------+
+| |
++----------------------------------------------------------+
+
mysql> select bitmap_count(bitmap_and(to_bitmap(1), to_bitmap(1))) cnt;
+------+
| cnt |
diff --git
a/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_and_not.md
b/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_and_not.md
index d24bcb3a87..a4691327a2 100644
---
a/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_and_not.md
+++
b/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_and_not.md
@@ -41,6 +41,28 @@ mysql> select
bitmap_count(bitmap_and_not(bitmap_from_string('1,2,3'),bitmap_fro
+------+
| 2 |
+------+
+
+mysql> select
bitmap_to_string(bitmap_and_not(bitmap_from_string('1,2,3'),bitmap_from_string('3,4,5')));
++--------------------------------------------------------------------------------------------+
+| bitmap_to_string(bitmap_and_not(bitmap_from_string('1,2,3'),
bitmap_from_string('3,4,5'))) |
++--------------------------------------------------------------------------------------------+
+| 1,2
|
++--------------------------------------------------------------------------------------------+
+1 row in set (0.01 sec)
+
+mysql> select
bitmap_to_string(bitmap_and_not(bitmap_from_string('1,2,3'),bitmap_empty())) ;
++-------------------------------------------------------------------------------+
+| bitmap_to_string(bitmap_and_not(bitmap_from_string('1,2,3'),
bitmap_empty())) |
++-------------------------------------------------------------------------------+
+| 1,2,3
|
++-------------------------------------------------------------------------------+
+
+mysql> select
bitmap_to_string(bitmap_and_not(bitmap_from_string('1,2,3'),NULL));
++---------------------------------------------------------------------+
+| bitmap_to_string(bitmap_and_not(bitmap_from_string('1,2,3'), NULL)) |
++---------------------------------------------------------------------+
+| NULL |
++---------------------------------------------------------------------+
```
### keywords
diff --git
a/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_empty.md
b/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_empty.md
index b677f5ac11..1d0fcce53b 100644
--- a/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_empty.md
+++ b/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_empty.md
@@ -45,6 +45,14 @@ mysql> select bitmap_count(bitmap_empty());
+------------------------------+
| 0 |
+------------------------------+
+
+mysql> select bitmap_to_string(bitmap_empty());
++----------------------------------+
+| bitmap_to_string(bitmap_empty()) |
++----------------------------------+
+| |
++----------------------------------+
+
```
### keywords
diff --git
a/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_has_all.md
b/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_has_all.md
index c98f79313d..d38bfb4db5 100644
---
a/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_has_all.md
+++
b/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_has_all.md
@@ -36,19 +36,19 @@ under the License.
### example
```
-mysql> select bitmap_has_all(bitmap_from_string("0, 1, 2"),
bitmap_from_string("1, 2")) cnt;
-+------+
-| cnt |
-+------+
-| 1 |
-+------+
-
-mysql> select bitmap_has_all(bitmap_empty(), bitmap_from_string("1, 2")) cnt;
-+------+
-| cnt |
-+------+
-| 0 |
-+------+
+mysql> select bitmap_has_all(bitmap_from_string("0, 1, 2"),
bitmap_from_string("1, 2"));
++---------------------------------------------------------------------------+
+| bitmap_has_all(bitmap_from_string('0, 1, 2'), bitmap_from_string('1, 2')) |
++---------------------------------------------------------------------------+
+| 1 |
++---------------------------------------------------------------------------+
+
+mysql> select bitmap_has_all(bitmap_empty(), bitmap_from_string("1, 2"));
++------------------------------------------------------------+
+| bitmap_has_all(bitmap_empty(), bitmap_from_string('1, 2')) |
++------------------------------------------------------------+
+| 0 |
++------------------------------------------------------------+
```
### keywords
diff --git
a/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_has_any.md
b/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_has_any.md
index 858228ae31..b483d885db 100644
---
a/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_has_any.md
+++
b/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_has_any.md
@@ -35,19 +35,19 @@ under the License.
### example
```
-mysql> select bitmap_has_any(to_bitmap(1),to_bitmap(2)) cnt;
-+------+
-| cnt |
-+------+
-| 0 |
-+------+
-
-mysql> select bitmap_has_any(to_bitmap(1),to_bitmap(1)) cnt;
-+------+
-| cnt |
-+------+
-| 1 |
-+------+
+mysql> select bitmap_has_any(to_bitmap(1),to_bitmap(2));
++--------------------------------------------+
+| bitmap_has_any(to_bitmap(1), to_bitmap(2)) |
++--------------------------------------------+
+| 0 |
++--------------------------------------------+
+
+mysql> select bitmap_has_any(to_bitmap(1),to_bitmap(1));
++--------------------------------------------+
+| bitmap_has_any(to_bitmap(1), to_bitmap(1)) |
++--------------------------------------------+
+| 1 |
++--------------------------------------------+
```
### keywords
diff --git
a/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_hash64.md
b/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_hash64.md
index 38c6bf22b7..a0c4f5d103 100644
--- a/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_hash64.md
+++ b/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_hash64.md
@@ -39,12 +39,12 @@ cat data | curl --location-trusted -u user:passwd -T - -H
"columns: dt,page,devi
### example
```
-mysql> select bitmap_count(bitmap_hash64('hello'));
-+------------------------------------+
-| bitmap_count(bitmap_hash64('hello')) |
-+------------------------------------+
-| 1 |
-+------------------------------------+
+mysql> select bitmap_to_string(bitmap_hash64('hello'));
++------------------------------------------+
+| bitmap_to_string(bitmap_hash64('hello')) |
++------------------------------------------+
+| 15231136565543391023 |
++------------------------------------------+
```
### keywords
diff --git
a/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_not.md
b/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_not.md
index d2e27f2a64..af684925c6 100644
--- a/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_not.md
+++ b/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_not.md
@@ -35,16 +35,17 @@ under the License.
### example
```
-mysql> select
bitmap_count(bitmap_not(bitmap_from_string('2,3'),bitmap_from_string('1,2,3,4')))
cnt;
-+------+
-| cnt |
-+------+
-| 0 |
-+------+
+mysql> select
bitmap_to_string(bitmap_not(bitmap_from_string('2,3'),bitmap_from_string('1,2,3,4')));
++----------------------------------------------------------------------------------------+
+| bitmap_to_string(bitmap_not(bitmap_from_string('2,3'),
bitmap_from_string('1,2,3,4'))) |
++----------------------------------------------------------------------------------------+
+|
|
++----------------------------------------------------------------------------------------+
+1 row in set (0.01 sec)
mysql> select
bitmap_to_string(bitmap_not(bitmap_from_string('2,3,5'),bitmap_from_string('1,2,3,4')));
+----------------------------------------------------------------------------------------+
-| bitmap_to_string(bitmap_xor(bitmap_from_string('2,3,5'),
bitmap_from_string('1,2,3,4'))) |
+| bitmap_to_string(bitmap_not(bitmap_from_string('2,3,5'),
bitmap_from_string('1,2,3,4'))) |
+----------------------------------------------------------------------------------------+
| 5
|
+----------------------------------------------------------------------------------------+
diff --git
a/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_or.md
b/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_or.md
index 90c5f89590..811777fa8a 100644
--- a/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_or.md
+++ b/docs/zh-CN/docs/sql-manual/sql-functions/bitmap-functions/bitmap_or.md
@@ -35,42 +35,49 @@ under the License.
### example
```
-mysql> select bitmap_count(bitmap_or(to_bitmap(1), to_bitmap(2))) cnt;
+mysql> select bitmap_count(bitmap_or(to_bitmap(1), to_bitmap(1))) cnt;
+------+
| cnt |
+------+
-| 2 |
+| 1 |
+------+
-mysql> select bitmap_count(bitmap_or(to_bitmap(1), to_bitmap(1))) cnt;
+mysql> select bitmap_to_string(bitmap_or(to_bitmap(1), to_bitmap(1))) ;
++---------------------------------------------------------+
+| bitmap_to_string(bitmap_or(to_bitmap(1), to_bitmap(1))) |
++---------------------------------------------------------+
+| 1 |
++---------------------------------------------------------+
+
+mysql> select bitmap_count(bitmap_or(to_bitmap(1), to_bitmap(2))) cnt;
+------+
| cnt |
+------+
-| 1 |
+| 2 |
+------+
-MySQL> select bitmap_to_string(bitmap_or(to_bitmap(1), to_bitmap(2)));
+mysql> select bitmap_to_string(bitmap_or(to_bitmap(1), to_bitmap(2)));
+---------------------------------------------------------+
| bitmap_to_string(bitmap_or(to_bitmap(1), to_bitmap(2))) |
+---------------------------------------------------------+
| 1,2 |
+---------------------------------------------------------+
-MySQL> select bitmap_to_string(bitmap_or(to_bitmap(1), to_bitmap(2),
to_bitmap(10), to_bitmap(0), NULL));
+mysql> select bitmap_to_string(bitmap_or(to_bitmap(1), to_bitmap(2),
to_bitmap(10), to_bitmap(0), NULL));
+--------------------------------------------------------------------------------------------+
| bitmap_to_string(bitmap_or(to_bitmap(1), to_bitmap(2), to_bitmap(10),
to_bitmap(0), NULL)) |
+--------------------------------------------------------------------------------------------+
-| NULL
|
+| 0,1,2,10
|
+--------------------------------------------------------------------------------------------+
-MySQL> select bitmap_to_string(bitmap_or(to_bitmap(1), to_bitmap(2),
to_bitmap(10), to_bitmap(0), bitmap_empty()));
+mysql> select bitmap_to_string(bitmap_or(to_bitmap(1), to_bitmap(2),
to_bitmap(10), to_bitmap(0), bitmap_empty()));
+------------------------------------------------------------------------------------------------------+
| bitmap_to_string(bitmap_or(to_bitmap(1), to_bitmap(2), to_bitmap(10),
to_bitmap(0), bitmap_empty())) |
+------------------------------------------------------------------------------------------------------+
| 0,1,2,10
|
+------------------------------------------------------------------------------------------------------+
-MySQL> select bitmap_to_string(bitmap_or(to_bitmap(10),
bitmap_from_string('1,2'), bitmap_from_string('1,2,3,4,5')));
+mysql> select bitmap_to_string(bitmap_or(to_bitmap(10),
bitmap_from_string('1,2'), bitmap_from_string('1,2,3,4,5')));
+--------------------------------------------------------------------------------------------------------+
| bitmap_to_string(bitmap_or(to_bitmap(10), bitmap_from_string('1,2'),
bitmap_from_string('1,2,3,4,5'))) |
+--------------------------------------------------------------------------------------------------------+
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]