This is an automated email from the ASF dual-hosted git repository.
JingsongLi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/paimon-rust.git
The following commit(s) were added to refs/heads/main by this push:
new bccb6999 docs: align Diff, Go filter, and compaction binding docs with
code (#1363)
bccb6999 is described below
commit bccb69998c4cdcde36ec4d19a9219ffc33d3dfe0
Author: AuroraVoyage <[email protected]>
AuthorDate: Wed Nov 11 10:59:34 2026 +0800
docs: align Diff, Go filter, and compaction binding docs with code (#1363)
---
bindings/go/read_builder.go | 22 +++++++++-------------
docs/src/compaction.md | 7 +++++--
docs/src/go-binding.md | 9 ++++++---
docs/src/incremental-reading.md | 12 ++++++++----
4 files changed, 28 insertions(+), 22 deletions(-)
diff --git a/bindings/go/read_builder.go b/bindings/go/read_builder.go
index 8a2e3653..adbc8976 100644
--- a/bindings/go/read_builder.go
+++ b/bindings/go/read_builder.go
@@ -112,25 +112,21 @@ func (rb *ReadBuilder) WithLimit(limit int) error {
return ffiReadBuilderWithLimit.symbol(rb.ctx)(rb.inner, uintptr(limit))
}
-// WithFilter sets a filter predicate for scan planning and read-side pruning.
+// WithFilter sets a filter predicate for scan planning and read-side
filtering.
//
// The predicate is used in two phases:
// - Scan planning: prunes partitions, buckets, and data files based on
// file-level statistics (min/max). This is conservative — files whose
// statistics are inconclusive are kept.
-// - Read-side: applies row-level filtering via Parquet native row filters
-// for supported leaf predicates (Eq, NotEq, Lt, Le, Gt, Ge, IsNull,
-// IsNotNull, In, NotIn).
+// - Read-side: may use Parquet native row filters for supported leaf
+// predicates, then enforces the full predicate with an exact residual
+// filter on append, data-evolution, and primary-key merge reads.
//
-// Row-level filtering is exact for most common types (Bool, Int, Long, Float,
-// Double, String, Date, Decimal, Binary). However, the following cases are NOT
-// filtered at the row level and may return non-matching rows:
-// - Compound predicates (And/Or/Not) — not yet implemented for row-level
filtering.
-// - Time, Timestamp, and LocalZonedTimestamp columns (not yet implemented).
-// - Schema-evolution: the predicate column does not exist in older data
files.
-// - Data-evolution mode (data-evolution.enabled = true).
-//
-// In these cases callers should apply residual filtering on the returned
records.
+// Native push-down is a best-effort optimization and may skip compound
+// predicates or leaf shapes it cannot evaluate. Exactness still comes from the
+// residual pass, which retains And/Or/Not trees and filters every yielded
+// batch. Callers do not need to re-apply the predicate for ordinary Paimon
+// reads.
//
// The predicate is consumed (ownership transferred to the read builder);
// the caller must NOT close it after this call.
diff --git a/docs/src/compaction.md b/docs/src/compaction.md
index b5f965c3..15c375d3 100644
--- a/docs/src/compaction.md
+++ b/docs/src/compaction.md
@@ -747,5 +747,8 @@ deletion vectors and source-backed PK indexes, or deletion
vectors and global
indexes in Data Evolution mode.
Embedded and sidecar file indexes are regenerated according to the captured
table options. The automatic behavior also applies to language bindings using
the
-table committer. The manual compaction API and background compaction scheduling
-are not yet exposed through language bindings.
+table committer. One-shot manual compaction is exposed to Python through
+[`table.new_compact_builder()`](python-binding.md#compaction) and to SQL
through
+[`CALL sys.compact`](sql.md#compact). Go and C bindings do not expose a manual
+compaction builder yet. Background compaction scheduling is not exposed through
+language bindings.
diff --git a/docs/src/go-binding.md b/docs/src/go-binding.md
index a343fb6e..de780ed6 100644
--- a/docs/src/go-binding.md
+++ b/docs/src/go-binding.md
@@ -582,10 +582,13 @@ built, so its case sensitivity comes from which builder
created it — see
Filter push-down prunes data at two levels:
1. **Scan planning** — skips partitions, buckets, and data files based on
file-level statistics (min/max).
-2. **Read-side** — applies row-level filtering via Parquet native row filters
for leaf predicates.
+2. **Read-side** — applies row-level filtering via Parquet native row filters
for leaf predicates, then enforces the full predicate with an exact residual
filter.
-!!! warning
- Filter push-down is a **best-effort** optimization. The returned results
may still contain rows that do not satisfy the filter condition. Callers should
always apply residual filtering on the returned records to ensure correctness.
+Stats pruning and native push-down are conservative optimizations: inconclusive
+files and unsupported push-down shapes are kept for later filtering. Ordinary
+Paimon reads still return only matching rows because append, data-evolution,
and
+primary-key merge paths apply an exact residual filter over the full predicate,
+including compound `And` / `Or` / `Not` trees.
### Building Predicates
diff --git a/docs/src/incremental-reading.md b/docs/src/incremental-reading.md
index 8e91db22..9051dfef 100644
--- a/docs/src/incremental-reading.md
+++ b/docs/src/incremental-reading.md
@@ -88,10 +88,14 @@ records by comparing the before and after images. If table
option
`Diff` currently:
- requires a primary-key table with `merge-engine=deduplicate`;
-- does not support deletion vectors or bucket rescaling between the two
- snapshots;
-- supports `BOOLEAN`, integer, floating-point, character, string, and `DATE`
- columns;
+- reads each endpoint snapshot's deletion-vector state when deletion vectors
+ are enabled (merge-on-read or materialized); it does not support bucket
+ rescaling between the two snapshots;
+- supports these scalar types for primary-key columns and nested value columns:
+ `BOOLEAN`, integers, floating-point, character/string, `DATE`, `BINARY` /
+ `VARBINARY`, `DECIMAL`, `TIME`, `TIMESTAMP`, and `LocalZonedTimestamp`.
+ Non-key values may also be nested `ROW`, `ARRAY`, `MAP`, `MULTISET`, or
+ `VECTOR` of those scalars;
- uses table option `diff.parallelism` to control concurrent
partition-and-bucket comparisons (default: `4`, minimum: `1`).