This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new fb967f3e800 [doc] Add type of SET for BitmapValue (#1189)
fb967f3e800 is described below

commit fb967f3e8009577afcc970a4feff7163938ed28a
Author: Jerry Hu <mrh...@gmail.com>
AuthorDate: Wed Oct 16 23:22:51 2024 +0800

    [doc] Add type of SET for BitmapValue (#1189)
    
    # Versions
    
    - [x] dev
    - [x] 3.0
    - [x] 2.1
    - [ ] 2.0
    
    # Languages
    
    - [x] Chinese
    - [x] English
---
 community/developer-guide/bitmap-hll-file-format.md                      | 1 +
 .../current/developer-guide/bitmap-hll-file-format.md                    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/community/developer-guide/bitmap-hll-file-format.md 
b/community/developer-guide/bitmap-hll-file-format.md
index 201e99a7e26..6296d57e9e6 100644
--- a/community/developer-guide/bitmap-hll-file-format.md
+++ b/community/developer-guide/bitmap-hll-file-format.md
@@ -45,6 +45,7 @@ The Flag value description is as follows:
 | 2 | BITMAP32, 32-bit bitmap corresponds to the type 
`org.roaringbitmap.RoaringBitmap` in java. The type is `roaring::Roaring` in 
C++, and the following data is the structure after the sequence of 
roaring::Roaring. You can use `org in java. .roaringbitmap.RoaringBitmap` or 
`roaring::Roaring` in c++ directly deserialize |
 | 3 | SINGLE64, there is only one 64-bit unsigned integer value in the bitmap, 
and the next 8 bytes represent the 64-bit unsigned integer value |
 | 4 | BITMAP64, 64-bit bitmap corresponds to `org.roaringbitmap.RoaringBitmap` 
in java; `Roaring64Map` in doris in c++. The data structure is the same as the 
result in the roaring library, but the serialization and deserialization 
methods It is different, there will be 1-8 bytes of variable-length encoding 
uint64 in the bitmap representation of the size. The following data is a series 
of multiple high-order representations of 4 bytes and 32-bit roaring bitmap 
serialized data repeated |
+| 5 | SET, When the number of values in the bitmap is greater than one and 
less than 32, the BitmapValue actually uses a hash set to store the values. The 
data structure: A uint8_t of one byte represents the number of values, followed 
by the values themselves (8 bytes each, uint64_t). |
 
 C++ serialization and deserialization examples are in the 
`BitmapValue::write()` method in `be/src/util/bitmap_value.h` and the Java 
examples are in the `serialize()` `deserialize()` method in 
`fe/fe-common/src/main/java/org/apache/doris/common/io/BitmapValue.java`.
 
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/developer-guide/bitmap-hll-file-format.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/developer-guide/bitmap-hll-file-format.md
index 8e2aacd0c14..9dac330d7ea 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/developer-guide/bitmap-hll-file-format.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/developer-guide/bitmap-hll-file-format.md
@@ -45,6 +45,7 @@ Flag 值说明如下:
 | 2    | BITMAP32,32 位bitmap 对应java 中类型为 `org.roaringbitmap.RoaringBitmap` C++ 
中类型为`roaring::Roaring`, 后面data 为roaring::Roaring 序列后的结构, 可以使用java 中的 
`org.roaringbitmap.RoaringBitmap`  或c++中`roaring::Roaring` 直接反序列化 |
 | 3    | SINGLE64 ,bitmap 中只有一个64位无符号整型值,后面8个字节表示64位无符号整型值 |
 | 4    | BITMAP64, 64 位bitmap 对应java 中类型为 `org.roaringbitmap.RoaringBitmap;` 
c++ 中类型为doris 中的`Roaring64Map`,数据结构和 roaring 
库中的结果一致,但是序列化和反序列话方法有所不同,后面会有1-8个字节的变长编码的uint64 的表述bitmap 中size。后面的数据是各式是多个 
4个字节的高位表示和32位 roaring bitmap 序列化数据重复而成 |
+| 5    | SET, 当 bitmap 的值的个数在1和32之间时, 实际的存储类型是 hashset. 数据结构是: 一个字节代表值的个数, 
后面跟着所有值(每个值的长度是8字节)。 |
 
 c++ 序列化和反序列化的示例 在 `be/src/util/bitmap_value.h` 的`BitmapValue::write()`   
`BitmapValue::deserialize()`  方法中, Java示例在 
`fe/fe-common/src/main/java/org/apache/doris/common/io/BitmapValue.java` 
中的`serialize()` `deserialize()` 方法中。
 


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

Reply via email to