@@ -24,11 +24,11 @@ Paimon 2.0 primary-key tables support *source-backed* global scalar indexes
2424covers an immutable ordered source group from one positive data level of one bucket, and
2525its results are group ordinals that are localized back to per-file physical row positions.
2626
27- paimon-cpp supports the read path of this protocol: ordinary batch scans of a
28- primary-key table with scalar index definitions automatically evaluate the part of the
29- scan predicate that touches indexed fields against the validated payload groups of the
30- scanned snapshot, and narrow covered files to indexed splits carrying file-local row
31- ranges. No dedicated query API is required.
27+ paimon-cpp supports the BTree build, maintenance, and read lifecycle of this protocol for
28+ fixed-bucket primary-key tables. Compaction automatically builds one immutable payload for
29+ each indexed field and positive data level. Ordinary batch scans evaluate the indexed part
30+ of the predicate against validated payload groups and narrow covered files to indexed
31+ splits carrying file-local row ranges. No dedicated build or query API is required.
3232
3333Table requirements
3434------------------
@@ -37,7 +37,8 @@ The definitions follow the Java table options:
3737
3838- ``'pk-btree.index.columns' = 'price' `` with optional
3939 ``'fields.price.pk-btree.index.options' = '{"block-size":"64 kb"}' ``
40- - fixed bucket (``bucket > 0 ``) or postpone bucket mode
40+ - fixed bucket (``bucket > 0 ``) for automatic C++ maintenance; Java-compatible postpone
41+ bucket schemas remain readable, but the C++ postpone writer does not build payloads
4142- ``'deletion-vectors.enabled' = 'true' `` and ``'deletion-vectors.merge-on-read' = 'false' ``
4243
4344Semantics
@@ -50,6 +51,23 @@ Semantics
5051 level, an active source's row count differs, its metadata or row range is invalid, or
5152 another payload exists for that level. Active files without accepted coverage are scanned
5253 normally.
54+ - Index construction reads every physical source row without applying deletion vectors,
55+ orders source files by file name, and externally sorts ``(value, group row id) ``. During
56+ maintenance, missing, duplicate, malformed, or incomplete payloads cause their complete current
57+ level to be rebuilt. A payload that still covers every active source is reused even if it also
58+ lists retired sources. Data files and the corresponding index ADD / DELETE entries are committed
59+ in the same snapshot.
60+ - The builder uses the existing write-buffer and spill settings. A write context needs a
61+ temporary directory when a level exceeds the in-memory write buffer and spill is enabled.
62+ - If payload construction fails, the data-file transition is still committed. Uncovered files at
63+ that level fall back to scanning while any previously usable payload remains active, and a later
64+ maintenance attempt can rebuild the complete current source group. Structural commit-increment
65+ errors are still rejected.
66+ - Snapshot expiration retains payloads referenced by the snapshots in its retention set and
67+ current-branch live tags, and removes retired payloads before their index manifests, including
68+ payloads on an external index path. Expiration is rejected while another branch exists until
69+ cross-branch file retention is supported. Orphan cleanup covers table-local index manifests and
70+ payloads; it does not enumerate a potentially shared global-index external path.
5371- ``AND `` predicates narrow with any safely evaluable indexed child; ``OR `` predicates
5472 only use the index when every branch is evaluable. Files whose evaluation fails, whose
5573 positions are out of range, or whose result needs more than 4096 ranges fall back to a
@@ -70,6 +88,6 @@ Current scope
7088 currently use the existing C++ length-prefixed UTF-8 streams; ASCII and non-null BMP
7189 names are compatible with Java ``writeUTF ``, while complete modified UTF-8 support for
7290 supplementary code points will be handled by a shared stream-level change.
73- - `` PkSortedIndexFile::Build `` can build one payload for an ordered source group from
74- value-sorted input, which supports tooling and tests; automatic build and maintenance
75- during compaction is not included yet .
91+ - Automatic maintenance is synchronous during prepare-commit. Java's asynchronous build
92+ scheduling, retries, fairness metrics, and manual rebuild actions are not part of the C++
93+ API. Realtime and postpone-bucket writers do not build source-backed payloads .
0 commit comments