jacktengg commented on code in PR #21721:
URL: https://github.com/apache/doris/pull/21721#discussion_r1260478780


##########
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));

Review Comment:
   The reslt of this example is wrong, it should be:
   ```
   mysql [(none)]>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)) |
   
+--------------------------------------------------------------------------------------------+
   | 0,1,2,10                                                                   
                |
   
+--------------------------------------------------------------------------------------------+
   1 row in set (0.03 sec)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to