This is an automated email from the ASF dual-hosted git repository.
laskoviymishka pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-go.git
The following commit(s) were added to refs/heads/main by this push:
new c78f76e42 refactor(table)!: move table/substrait to
table/internal/substrait (#2649)
c78f76e42 is described below
commit c78f76e42e52b4e6e6ee70b97a92f4e89f62a970
Author: Andrei Tserakhau <[email protected]>
AuthorDate: Fri Nov 20 20:07:43 2026 +0100
refactor(table)!: move table/substrait to table/internal/substrait (#2649)
ConvertExpr, ConvertSchema and NewExtensionSet return substrait-go v8
and arrow compute/exprs types, which pins those third-party types into
the exported API. The package is only used inside table, so move it
under table/internal with its tests, benchmark and the embedded
functions_set.yaml, and update the four importing files in table.
This is a pure move: package name, code and behavior are unchanged.
Code importing table/substrait no longer compiles and there is no
replacement. substrait-go stays a module dependency because table
still uses it internally.
---
table/arrow_filter_plan.go | 2 +-
table/arrow_scanner.go | 2 +-
table/{ => internal}/substrait/endian_be.go | 0
table/{ => internal}/substrait/endian_fallback.go | 0
table/{ => internal}/substrait/endian_le.go | 0
table/{ => internal}/substrait/functions_set.yaml | 0
table/{ => internal}/substrait/substrait.go | 0
table/{ => internal}/substrait/substrait_bench_test.go | 0
table/{ => internal}/substrait/substrait_decimal_internal_test.go | 0
table/{ => internal}/substrait/substrait_test.go | 2 +-
table/transaction.go | 2 +-
table/transaction_delete.go | 2 +-
website/src/releases.md | 2 +-
13 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/table/arrow_filter_plan.go b/table/arrow_filter_plan.go
index 9851a0a94..a7b7c8865 100644
--- a/table/arrow_filter_plan.go
+++ b/table/arrow_filter_plan.go
@@ -30,7 +30,7 @@ import (
"github.com/apache/iceberg-go"
iceinternal "github.com/apache/iceberg-go/internal"
tblutils "github.com/apache/iceberg-go/table/internal"
- "github.com/apache/iceberg-go/table/substrait"
+ "github.com/apache/iceberg-go/table/internal/substrait"
"github.com/substrait-io/substrait-go/v8/expr"
)
diff --git a/table/arrow_scanner.go b/table/arrow_scanner.go
index 48a37680b..1f242665c 100644
--- a/table/arrow_scanner.go
+++ b/table/arrow_scanner.go
@@ -43,7 +43,7 @@ import (
iceio "github.com/apache/iceberg-go/io"
"github.com/apache/iceberg-go/table/dv"
tblutils "github.com/apache/iceberg-go/table/internal"
- "github.com/apache/iceberg-go/table/substrait"
+ "github.com/apache/iceberg-go/table/internal/substrait"
"github.com/substrait-io/substrait-go/v8/expr"
"golang.org/x/sync/errgroup"
)
diff --git a/table/substrait/endian_be.go
b/table/internal/substrait/endian_be.go
similarity index 100%
rename from table/substrait/endian_be.go
rename to table/internal/substrait/endian_be.go
diff --git a/table/substrait/endian_fallback.go
b/table/internal/substrait/endian_fallback.go
similarity index 100%
rename from table/substrait/endian_fallback.go
rename to table/internal/substrait/endian_fallback.go
diff --git a/table/substrait/endian_le.go
b/table/internal/substrait/endian_le.go
similarity index 100%
rename from table/substrait/endian_le.go
rename to table/internal/substrait/endian_le.go
diff --git a/table/substrait/functions_set.yaml
b/table/internal/substrait/functions_set.yaml
similarity index 100%
rename from table/substrait/functions_set.yaml
rename to table/internal/substrait/functions_set.yaml
diff --git a/table/substrait/substrait.go
b/table/internal/substrait/substrait.go
similarity index 100%
rename from table/substrait/substrait.go
rename to table/internal/substrait/substrait.go
diff --git a/table/substrait/substrait_bench_test.go
b/table/internal/substrait/substrait_bench_test.go
similarity index 100%
rename from table/substrait/substrait_bench_test.go
rename to table/internal/substrait/substrait_bench_test.go
diff --git a/table/substrait/substrait_decimal_internal_test.go
b/table/internal/substrait/substrait_decimal_internal_test.go
similarity index 100%
rename from table/substrait/substrait_decimal_internal_test.go
rename to table/internal/substrait/substrait_decimal_internal_test.go
diff --git a/table/substrait/substrait_test.go
b/table/internal/substrait/substrait_test.go
similarity index 99%
rename from table/substrait/substrait_test.go
rename to table/internal/substrait/substrait_test.go
index 1df96e790..61a59e53c 100644
--- a/table/substrait/substrait_test.go
+++ b/table/internal/substrait/substrait_test.go
@@ -22,7 +22,7 @@ import (
"testing"
"github.com/apache/iceberg-go"
- "github.com/apache/iceberg-go/table/substrait"
+ "github.com/apache/iceberg-go/table/internal/substrait"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/substrait-io/substrait-go/v8/types"
diff --git a/table/transaction.go b/table/transaction.go
index f1c731a5c..ca9f9c39c 100644
--- a/table/transaction.go
+++ b/table/transaction.go
@@ -36,7 +36,7 @@ import (
"github.com/apache/iceberg-go"
iceberginternal "github.com/apache/iceberg-go/internal"
"github.com/apache/iceberg-go/io"
- "github.com/apache/iceberg-go/table/substrait"
+ "github.com/apache/iceberg-go/table/internal/substrait"
"github.com/google/uuid"
)
diff --git a/table/transaction_delete.go b/table/transaction_delete.go
index a966bf16c..bab0e1a4d 100644
--- a/table/transaction_delete.go
+++ b/table/transaction_delete.go
@@ -35,7 +35,7 @@ import (
"github.com/apache/iceberg-go/io"
"github.com/apache/iceberg-go/table/dv"
tblutils "github.com/apache/iceberg-go/table/internal"
- "github.com/apache/iceberg-go/table/substrait"
+ "github.com/apache/iceberg-go/table/internal/substrait"
"github.com/google/uuid"
"golang.org/x/sync/errgroup"
)
diff --git a/website/src/releases.md b/website/src/releases.md
index 600228ea7..226772d4d 100644
--- a/website/src/releases.md
+++ b/website/src/releases.md
@@ -121,7 +121,7 @@ Per-release notes (highlights, breaking changes,
contributors) are published on
- **View representation field uses the Go SQL initialism.** Replace
`view.Representation.Sql` with `view.Representation.SQL`. Serialized view
metadata still uses the `sql` JSON field.
- **Orphan cleanup results now expose only `OrphanFiles`.** Replace
`result.OrphanFileLocations` with `result.OrphanFiles` (each entry has `Path`
and `SizeBytes`). `OrphanCleanupPlan.Files()` still provides path-only lists
during planning.
- **Catalog identifier helper renamed.** `catalog.TableNameFromIdent` is
removed. Use `catalog.ObjectNameFromIdent` for tables, views, and functions.
-- **Substrait expression conversion no longer takes case sensitivity.**
`substrait.ConvertExpr(schema, expression, caseSensitive)` becomes
`substrait.ConvertExpr(schema, expression)`. Case sensitivity remains part of
expression binding.
+- **`table/substrait` is now internal.** The package moved to
`table/internal/substrait`, so `substrait.ConvertExpr`,
`substrait.ConvertSchema` and `substrait.NewExtensionSet` are no longer
exported. There is no replacement; scans and deletes still convert filters
internally.
- **Transform formatting requires the result type and uses the Java-aligned
method name.** `Transform.ToHumanStr(value)` and
`Transform.ToHumanStrType(resultType, value)` are removed. Use
`Transform.ToHumanString(resultType, value)` to format partition values,
including timestamps with time zones.
- **Catalogs now require cleanup.** The `catalog.Catalog` interface includes
`Close() error`. Custom catalog implementations must provide `Close`, and
callers should close catalog instances after use. `catalog.Closer` is removed.
Replace `cat.(catalog.Closer)` checks with `defer cat.Close()`;
`catalog.Catalog` already implements `io.Closer`, so no type assertion is
needed.