This is an automated email from the ASF dual-hosted git repository.
github-actions[bot] pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/iceberg-go.git
The following commit(s) were added to refs/heads/gh-pages by this push:
new 3b511f869 deploy: 00fbb576ea4e8e9d87757189cc690f3c137dcbca
3b511f869 is described below
commit 3b511f869dcd4c08a3a0ec2eba028c2381c982e0
Author: zeroshade <[email protected]>
AuthorDate: Thu Oct 29 20:06:54 2026 +0000
deploy: 00fbb576ea4e8e9d87757189cc690f3c137dcbca
---
api.html | 12 ++++++++++++
print.html | 12 ++++++++++++
searchindex.js | 2 +-
searchindex.json | 2 +-
4 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/api.html b/api.html
index 4d5927210..a9610f755 100644
--- a/api.html
+++ b/api.html
@@ -611,6 +611,18 @@ fmt.Printf("rewrote %d files into %d (%d -> %d
bytes)\n",
</code></pre>
<p>The <code>table/compaction</code> subpackage provides bin-packing planning.
The <code>iceberg compact analyze</code> and <code>compact run</code> CLI
commands wrap the same machinery - see <a href="./cli.html">CLI</a>.</p>
<p>Compaction tasks represent complete data files, not independent scan
splits. The planner collapses split tasks for the same file into one whole-file
task, rejecting inconsistent delete or lineage metadata and dropping residual
filters because they select files but do not filter rows during compaction.
Direct calls to <code>ExecuteCompactionGroup</code> reject partial ranges and
residual row filters. Attached delete files are still applied when rewriting
each source file.</p>
+<p>To sort instead of bin-pack, pass
<code>table.WithCompactionSortOrder</code> as a group option. Each group is
sorted as a whole, so every output file holds a sorted, non-overlapping range
of it. Output files record the order's <code>sort_order_id</code> when the
order is one of the table's sort orders, every field has one source column,
every field but the last is identity and the last preserves order (see
<code>table.WithCompactionSortOrder</code>). Files of different groups still ov
[...]
+<pre><code class="language-go">cfg := compaction.DefaultConfig()
+cfg.RewriteAll = true
+cfg.MaxGroupSizeBytes = 8 << 30 // 8 GiB per group
+plan, err := compaction.Analyze(ctx, tbl, cfg)
+if err != nil { /* ... */ }
+
+result, err := txn.RewriteDataFiles(ctx, groups /* from plan.Groups */,
table.RewriteDataFilesOptions{
+ GroupOptions:
[]table.CompactionGroupOption{table.WithCompactionSortOrder(tbl.SortOrder())},
+})
+</code></pre>
+<p>When every file of a group already records the order's
<code>sort_order_id</code> (for example, files written by an earlier sort
rewrite), every sort field is identity, and no partition of the group has more
files than the scan concurrency
(<code>table.WithCompactionScanConcurrency</code>, <code>GOMAXPROCS</code> by
default), the files are streamed and merged, holding up to about five batches
per file instead of the whole group. Otherwise a sort rewrite holds each group
decoded in mem [...]
<h3 id="expiring-snapshots"><a class="header"
href="#expiring-snapshots">Expiring snapshots</a></h3>
<pre><code class="language-go">import (
"time"
diff --git a/print.html b/print.html
index bfd24528c..e6b155aa0 100644
--- a/print.html
+++ b/print.html
@@ -1573,6 +1573,18 @@ fmt.Printf("rewrote %d files into %d (%d -> %d
bytes)\n",
</code></pre>
<p>The <code>table/compaction</code> subpackage provides bin-packing planning.
The <code>iceberg compact analyze</code> and <code>compact run</code> CLI
commands wrap the same machinery - see <a href="./cli.html">CLI</a>.</p>
<p>Compaction tasks represent complete data files, not independent scan
splits. The planner collapses split tasks for the same file into one whole-file
task, rejecting inconsistent delete or lineage metadata and dropping residual
filters because they select files but do not filter rows during compaction.
Direct calls to <code>ExecuteCompactionGroup</code> reject partial ranges and
residual row filters. Attached delete files are still applied when rewriting
each source file.</p>
+<p>To sort instead of bin-pack, pass
<code>table.WithCompactionSortOrder</code> as a group option. Each group is
sorted as a whole, so every output file holds a sorted, non-overlapping range
of it. Output files record the order's <code>sort_order_id</code> when the
order is one of the table's sort orders, every field has one source column,
every field but the last is identity and the last preserves order (see
<code>table.WithCompactionSortOrder</code>). Files of different groups still ov
[...]
+<pre><code class="language-go">cfg := compaction.DefaultConfig()
+cfg.RewriteAll = true
+cfg.MaxGroupSizeBytes = 8 << 30 // 8 GiB per group
+plan, err := compaction.Analyze(ctx, tbl, cfg)
+if err != nil { /* ... */ }
+
+result, err := txn.RewriteDataFiles(ctx, groups /* from plan.Groups */,
table.RewriteDataFilesOptions{
+ GroupOptions:
[]table.CompactionGroupOption{table.WithCompactionSortOrder(tbl.SortOrder())},
+})
+</code></pre>
+<p>When every file of a group already records the order's
<code>sort_order_id</code> (for example, files written by an earlier sort
rewrite), every sort field is identity, and no partition of the group has more
files than the scan concurrency
(<code>table.WithCompactionScanConcurrency</code>, <code>GOMAXPROCS</code> by
default), the files are streamed and merged, holding up to about five batches
per file instead of the whole group. Otherwise a sort rewrite holds each group
decoded in mem [...]
<h3 id="expiring-snapshots"><a class="header"
href="#expiring-snapshots">Expiring snapshots</a></h3>
<pre><code class="language-go">import (
"time"
diff --git a/searchindex.js b/searchindex.js
index a575987dc..e44def8fb 100644
--- a/searchindex.js
+++ b/searchindex.js
@@ -1 +1 @@
-Object.assign(window.search,
{"doc_urls":["introduction.html#iceberg-go","introduction.html#where-to-start","introduction.html#what-works-today","introduction.html#beyond-go","introduction.html#help-and-contribution","install.html#install","install.html#requirements","install.html#installation","getting-started.html#getting-started","getting-started.html#1-install","getting-started.html#2-open-a-local-catalog","getting-started.html#3-create-a-namespace-and-a-table","getting-started.html#
[...]
\ No newline at end of file
+Object.assign(window.search,
{"doc_urls":["introduction.html#iceberg-go","introduction.html#where-to-start","introduction.html#what-works-today","introduction.html#beyond-go","introduction.html#help-and-contribution","install.html#install","install.html#requirements","install.html#installation","getting-started.html#getting-started","getting-started.html#1-install","getting-started.html#2-open-a-local-catalog","getting-started.html#3-create-a-namespace-and-a-table","getting-started.html#
[...]
\ No newline at end of file
diff --git a/searchindex.json b/searchindex.json
index 21286716a..cd2d43ee6 100644
--- a/searchindex.json
+++ b/searchindex.json
@@ -1 +1 @@
-{"doc_urls":["introduction.html#iceberg-go","introduction.html#where-to-start","introduction.html#what-works-today","introduction.html#beyond-go","introduction.html#help-and-contribution","install.html#install","install.html#requirements","install.html#installation","getting-started.html#getting-started","getting-started.html#1-install","getting-started.html#2-open-a-local-catalog","getting-started.html#3-create-a-namespace-and-a-table","getting-started.html#4-write-some-arrow-data","get
[...]
\ No newline at end of file
+{"doc_urls":["introduction.html#iceberg-go","introduction.html#where-to-start","introduction.html#what-works-today","introduction.html#beyond-go","introduction.html#help-and-contribution","install.html#install","install.html#requirements","install.html#installation","getting-started.html#getting-started","getting-started.html#1-install","getting-started.html#2-open-a-local-catalog","getting-started.html#3-create-a-namespace-and-a-table","getting-started.html#4-write-some-arrow-data","get
[...]
\ No newline at end of file