@@ -122,7 +122,22 @@ class PAIMON_EXPORT RecordBatchBuilder {
122122 // / @param data Map of partition column names to their string values.
123123 RecordBatchBuilder& SetPartition (const std::map<std::string, std::string>& data);
124124
125- // / Set the bucket id for this record batch. If not set, default value is `-1`.
125+ // / Set the bucket id for this record batch. If not set, default value is `-2147483648`
126+ // / (i.e., `HasSpecifiedBucket()` returns false), and the bucket will be auto-resolved
127+ // / at write time based on the table's bucket option:
128+ // /
129+ // / - **Unaware-bucket mode** (table option `bucket = -1`, append-only table without
130+ // / primary keys): the bucket will be auto-filled with `UNAWARE_BUCKET (0)`. If the
131+ // / caller does specify a bucket, it MUST be `UNAWARE_BUCKET (0)`, otherwise the
132+ // / write fails.
133+ // / - **Postpone-bucket mode** (table option `bucket = -2`, primary-key table whose
134+ // / bucket assignment is deferred): the bucket will be auto-filled with
135+ // / `POSTPONE_BUCKET (-2)`. If the caller does specify a bucket, it MUST be
136+ // / `POSTPONE_BUCKET (-2)`, otherwise the write fails.
137+ // / - **Fixed-bucket mode** (table option `bucket > 0`): the caller MUST explicitly
138+ // / call `SetBucket()` with a value in `[0, bucket)`; not calling `SetBucket()`
139+ // / (or passing an out-of-range value) will cause the write to fail.
140+ // /
126141 // / @param bucket The bucket id for data distribution.
127142 RecordBatchBuilder& SetBucket (int32_t bucket);
128143
0 commit comments