You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by sz...@apache.org on 2026/08/27 00:59:25 UTC
(iceberg) branch main updated: API: Add a builder usage example to PartitionSpec Javadoc (#17747)
This is an automated email from the ASF dual-hosted git repository.
szehon-ho pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/main by this push:
new a3401a12b4 API: Add a builder usage example to PartitionSpec Javadoc (#17747)
a3401a12b4 is described below
commit a3401a12b46ac66824d4df92e4086cfbe4dd3e14
Author: Uros <22...@users.noreply.github.com>
AuthorDate: Thu Aug 27 02:59:17 2026 +0200
API: Add a builder usage example to PartitionSpec Javadoc (#17747)
---
api/src/main/java/org/apache/iceberg/PartitionSpec.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/api/src/main/java/org/apache/iceberg/PartitionSpec.java b/api/src/main/java/org/apache/iceberg/PartitionSpec.java
index f0b1051ff5..9c1528582c 100644
--- a/api/src/main/java/org/apache/iceberg/PartitionSpec.java
+++ b/api/src/main/java/org/apache/iceberg/PartitionSpec.java
@@ -49,6 +49,15 @@ import org.apache.iceberg.types.Types.StructType;
*
* <p>Partition data is produced by transforming columns in a table. Each column transform is
* represented by a named {@link PartitionField}.
+ *
+ * <p>Partition specs are created using a builder obtained from {@link #builderFor(Schema)}:
+ *
+ * <pre>{@code
+ * PartitionSpec spec = PartitionSpec.builderFor(schema)
+ * .hour("ts")
+ * .bucket("id", 10)
+ * .build();
+ * }</pre>
*/
public class PartitionSpec implements Serializable {
// IDs for partition fields start at 1000