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

Gabriel39 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 6fb946b758f [doc](lakehouse) Document optional Parquet Bloom filter 
output (#4686)
6fb946b758f is described below

commit 6fb946b758fbaa09e56c9f5fa9f82437bb1e3632
Author: Gabriel <[email protected]>
AuthorDate: Tue Nov 24 09:56:13 2026 +0800

    [doc](lakehouse) Document optional Parquet Bloom filter output (#4686)
    
    Document the default-off `enable_parquet_write_bloom_filter` session
    variable in the English and Chinese Dev Parquet guides, with a complete
    OUTFILE example, supported write paths, BOOLEAN/INT96 exclusions,
    dictionary behavior, separate reader control, and memory/file-size
    costs.
    
    Companion implementation: https://github.com/apache/doris/pull/70875.
    Merge the documentation with the implementation. This is a master-only
    feature, so the 4.x and 3.x documentation is intentionally unchanged.
    
    Validation: both complete pages compile with the Docusaurus Markdown
    processor; all 18 internal links pass the repository link checker;
    bilingual examples and numeric defaults match. The docs-governance
    comparison reports no new findings against the base revision (the same
    existing anchor/SEO findings and version-sync notice remain). A full
    website build was not run locally.
    
    ## Versions
    
    - [x] dev
    - [ ] 4.x
    - [ ] 3.x
    - [ ] 2.1 or older (not covered by version/language sync gate)
    
    ## Languages
    
    - [x] Chinese
    - [x] English
    
    ## Docs Checklist
    
    - [x] Checked by AI
    - [ ] Test Cases Built
    - [x] Updated required version and language counterparts, or explained
    why not
    - [x] If only one language changed, confirmed whether source/translation
    counterparts need sync
    
    Documentation-only change; no new executable test cases. The companion
    implementation includes native unit tests and OUTFILE/TVF regression
    coverage.
---
 docs/lakehouse/file-formats/parquet.md             | 32 ++++++++++++++++++++++
 .../current/lakehouse/file-formats/parquet.md      | 32 ++++++++++++++++++++++
 2 files changed, 64 insertions(+)

diff --git a/docs/lakehouse/file-formats/parquet.md 
b/docs/lakehouse/file-formats/parquet.md
index 10d5bb60afc..57884444360 100644
--- a/docs/lakehouse/file-formats/parquet.md
+++ b/docs/lakehouse/file-formats/parquet.md
@@ -103,6 +103,38 @@ SET parquet_write_data_page_size = 1048576;
 
 Indexes add metadata and write-side work. Smaller pages can improve selective 
reads, especially when values are clustered, but also create more index entries 
and page headers. Benefits depend on the consuming engine and data 
distribution; enabling indexes does not guarantee faster queries. Readers can 
still read the files without using the optional indexes. These settings do not 
change the Parquet format version or data-page version.
 
+## Writing Bloom Filters (Dev Version)
+
+Enable Bloom filter output when downstream readers can use equality or `IN` 
predicates to skip row groups. Set the following session variable before an 
OUTFILE statement, an insert into a writable file table-valued function, or an 
insert into a Hive or Iceberg table stored as Parquet. It affects newly written 
files only.
+
+| Variable | Type | Default | Behavior |
+| --- | --- | --- | --- |
+| `enable_parquet_write_bloom_filter` | Boolean | `false` | Writes standard 
Parquet Bloom filters for eligible physical leaf columns in each row group, 
including leaves nested in ARRAY, MAP, and STRUCT. BOOLEAN and legacy INT96 
columns do not receive filters. |
+
+For example, prepare a writable S3 bucket and credentials as described in 
[OUTFILE](../../data-operate/export/outfile.md), then replace the storage 
placeholders and export with Bloom filters enabled:
+
+```sql
+SET enable_parquet_write_bloom_filter = true;
+
+SELECT 1 AS id, 'example' AS label
+INTO OUTFILE 's3://example-bucket/export/bloom_result_'
+FORMAT AS PARQUET
+PROPERTIES (
+    "s3.endpoint" = "https://s3.example.com";,
+    "s3.region" = "us-east-1",
+    "s3.access_key" = "<access_key>",
+    "s3.secret_key" = "<secret_key>"
+);
+
+SET enable_parquet_write_bloom_filter = false;
+```
+
+The new files contain a Bloom filter for each eligible column in each row 
group. The final `SET` restores the default for subsequent writes in this 
session; it does not remove filters from files already written. The same 
setting applies before `INSERT INTO` or `INSERT OVERWRITE` for a destination 
configured to write Parquet.
+
+Bloom filters remain available when dictionary encoding is retained, falls 
back to plain encoding, or is disabled. They do not require disabling 
dictionaries and are independent of the page-index write settings above. NULL 
values are not inserted into Bloom filters. Doris's read-side switch, 
`enable_parquet_filter_by_bloom_filter`, controls filter use separately; 
enabling output does not force a reader to use it. Readers that ignore the 
optional Bloom metadata can still read the files.
+
+Enable this option selectively, for example for equality predicates on 
high-cardinality columns after dictionary overflow. The writer uses a default 
expected distinct count of 1,048,576 and target false-positive probability of 
0.05, allocating approximately 1 MiB per eligible leaf column per row group, 
including all-null columns. Bloom buffers accumulate across row groups until 
the file is closed and count against the query memory limit. Wide schemas or 
many row groups can therefore incr [...]
+
 ## Parameters
 
 ### Timestamp and Date Compatibility (Since 4.1.5) 
{#timestamp-and-date-compatibility}
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/file-formats/parquet.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/file-formats/parquet.md
index 4c04f8ae929..654ee485549 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/file-formats/parquet.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/lakehouse/file-formats/parquet.md
@@ -113,6 +113,38 @@ SET parquet_write_data_page_size = 1048576;
 
 
页索引会增加元数据和写入开销。较小的数据页可能有利于高选择性查询,尤其是数据按过滤列聚集时,但也会生成更多索引条目和页头。收益取决于读取引擎和数据分布,开启索引不保证查询加速;读取端不使用这些可选索引时,仍可正常读取文件。这两个变量不改变
 Parquet 格式版本或数据页版本。
 
+## 写入 Bloom Filter(Dev 版本)
+
+当下游读取端能够通过等值或 `IN` 谓词跳过 Row Group 时,可以开启 Bloom Filter 写入。在执行 
OUTFILE、向可写文件表值函数插入数据,或向以 Parquet 存储的 Hive、Iceberg 表插入数据前,设置以下会话变量。该设置仅影响新写入的文件。
+
+| 变量 | 类型 | 默认值 | 行为 |
+| --- | --- | --- | --- |
+| `enable_parquet_write_bloom_filter` | Boolean | `false` | 为每个 Row Group 
中适用的物理叶子列写入标准 Parquet Bloom Filter,包括 ARRAY、MAP、STRUCT 中嵌套的叶子列。BOOLEAN 和旧 INT96 
编码的列不写入 Filter。 |
+
+例如,按照 [OUTFILE](../../data-operate/export/outfile.md) 文档准备可写的 S3 Bucket 
和凭据后,替换以下存储占位符,开启 Bloom Filter 并导出:
+
+```sql
+SET enable_parquet_write_bloom_filter = true;
+
+SELECT 1 AS id, 'example' AS label
+INTO OUTFILE 's3://example-bucket/export/bloom_result_'
+FORMAT AS PARQUET
+PROPERTIES (
+    "s3.endpoint" = "https://s3.example.com";,
+    "s3.region" = "us-east-1",
+    "s3.access_key" = "<access_key>",
+    "s3.secret_key" = "<secret_key>"
+);
+
+SET enable_parquet_write_bloom_filter = false;
+```
+
+新文件会为每个 Row Group 中的适用列包含 Bloom Filter。最后一条 `SET` 为当前会话的后续写入恢复默认值,不会移除已写入文件中的 
Filter。目标已配置为写入 Parquet 时,也可以在执行 `INSERT INTO` 或 `INSERT OVERWRITE` 前设置同一变量。
+
+字典编码保留、溢出后回退为普通编码,以及禁用字典编码时,都可以写出 Bloom 
Filter,无需为此关闭字典。该开关与上文的页索引写入设置相互独立。NULL 值不会插入 Bloom Filter。Doris 的读取端开关 
`enable_parquet_filter_by_bloom_filter` 单独控制是否使用 
Filter,开启写入不会强制读取端使用它。不使用该可选元数据的读取端仍可读取文件。
+
+建议按需开启,例如用于字典溢出后高基数列的等值过滤。写入端采用默认预期去重数 1,048,576、目标误判率 0.05,每个 Row Group 
中每个适用的物理叶子列约分配 1 MiB,全部为 NULL 的列也会分配。Bloom 缓冲会跨 Row Group 
累积到文件关闭,并计入查询内存限额,因此宽表或包含大量 Row Group 的文件可能显著增加内存占用。Filter 
还会增加哈希计算和文件大小,不保证读取速度提升。此版本不提供列选择、Bloom 大小调整或独立的单文件 Bloom 内存限额设置。
+
 ## 相关参数
 
 ### 时间戳与日期兼容性(4.1.5 起)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to