You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
github.com/apache/iceberg-go is a single Go module, so a consumer that only needs the metadata layer (schema, types, partition specs, table metadata, manifests) or the REST catalog client still links the Arrow execution stack. Measured on main (833e10c): a package main whose only import is _ "github.com/apache/iceberg-go/catalog/rest" builds to a 66 MB unstripped darwin/arm64 binary, against 4.9 MB for the same program importing only net/http, and its go.mod carries 65 indirect requirements.
go list -deps ./catalog/rest shows the chain: catalog/rest → table (plus table/dv, table/internal, table/substrait) → arrow-go/v18/{arrow,compute,parquet,ipc,flight}, substrait-go/v8, geoarrow-go. The root iceberg package now imports Arrow as well (manifest.go, exprs.go, literals.go, transforms.go, types.go, variant_cast.go, variant_extract.go → arrow/decimal128, parquet/variant, geoarrow-go), so the separation described in #399, where all Arrow use was confined to table, no longer holds.
Metadata-only consumers. Catalog proxies, REST gateways, metadata translation tools (Apache XTable-style bridges), and serverless functions read and write table metadata but never scan data. They pay for Arrow compute, Substrait, and Parquet decoding they cannot use, and inherit arrow-go and aws-sdk-go-v2 version constraints through MVS.
GOOS=js GOARCH=wasm. The root package and io already build for js/wasm. table and catalog/rest do not, and the single failing package is atomicgo.dev/keyboard, reached through pterm, which table/arrow_utils.go imports for progress output. That is a small fix on its own, but it shows how a terminal UI dependency in table reaches a REST client that has no terminal.
Reusable in-process REST catalog for tests. The unit tests in catalog/rest already run without containers against httptest handlers, and the container-backed tests are behind //go:build integration (internal/recipe/docker-compose.yml, apache/iceberg-rest-fixture). What is missing is a stateful, importable in-process REST catalog server that this repo's tests and downstream projects can use to drive a real client end to end (create namespace → create table → commit → load) without Docker, in the way httptest serves net/http.
Precedent in Apache Iceberg (Java)
iceberg-api: schemas, types, expressions, partition specs; depends only on bundled Guava.
iceberg-arrow, iceberg-spark, and the other engine modules: vectorized readers and engine adapters.
Proposal
Isolate packages, no new modules yet. Move the Arrow-dependent code in the root package (variant, decimal128 conversions, geoarrow edge-interpolation constants) and the scan and execution code in table into engine-facing sub-packages, so that iceberg, the metadata operations in table, and catalog/rest compile with the standard library plus the pure-Go JSON and Avro path. Whether a separate go.mod follows is a later decision, per Enormous dependency tree — consider "drivers"? #696.
In-process REST catalog testkit. An in-memory implementation of the REST catalog spec (config endpoint, namespaces, tables, commits with requirement validation) exposed as an http.Handler, usable from httptest in this repo's tests and importable by downstream projects.
Next steps
I would like to contribute this incrementally:
The testkit first, since it is additive and unblocks container-less end-to-end client tests.
Then the package isolation, one dependency edge at a time, each PR keeping go build ./... and the existing tests green.
Summary
github.com/apache/iceberg-gois a single Go module, so a consumer that only needs the metadata layer (schema, types, partition specs, table metadata, manifests) or the REST catalog client still links the Arrow execution stack. Measured onmain(833e10c): apackage mainwhose only import is_ "github.com/apache/iceberg-go/catalog/rest"builds to a 66 MB unstripped darwin/arm64 binary, against 4.9 MB for the same program importing onlynet/http, and itsgo.modcarries 65 indirect requirements.go list -deps ./catalog/restshows the chain:catalog/rest→table(plustable/dv,table/internal,table/substrait) →arrow-go/v18/{arrow,compute,parquet,ipc,flight},substrait-go/v8,geoarrow-go. The rooticebergpackage now imports Arrow as well (manifest.go,exprs.go,literals.go,transforms.go,types.go,variant_cast.go,variant_extract.go→arrow/decimal128,parquet/variant,geoarrow-go), so the separation described in #399, where all Arrow use was confined totable, no longer holds.Relationship to earlier issues
go.modfiles as a possible second pass. This proposal follows that ordering.Motivation
arrow-goandaws-sdk-go-v2version constraints through MVS.GOOS=js GOARCH=wasm. The root package andioalready build for js/wasm.tableandcatalog/restdo not, and the single failing package isatomicgo.dev/keyboard, reached throughpterm, whichtable/arrow_utils.goimports for progress output. That is a small fix on its own, but it shows how a terminal UI dependency intablereaches a REST client that has no terminal.catalog/restalready run without containers againsthttptesthandlers, and the container-backed tests are behind//go:build integration(internal/recipe/docker-compose.yml,apache/iceberg-rest-fixture). What is missing is a stateful, importable in-process REST catalog server that this repo's tests and downstream projects can use to drive a real client end to end (create namespace → create table → commit → load) without Docker, in the wayhttptestservesnet/http.Precedent in Apache Iceberg (Java)
iceberg-api: schemas, types, expressions, partition specs; depends only on bundled Guava.iceberg-core: table metadata JSON, manifests, commit operations, REST client; Jackson, HTTP client, Avro.iceberg-arrow,iceberg-spark, and the other engine modules: vectorized readers and engine adapters.Proposal
tableinto engine-facing sub-packages, so thaticeberg, the metadata operations intable, andcatalog/restcompile with the standard library plus the pure-Go JSON and Avro path. Whether a separatego.modfollows is a later decision, per Enormous dependency tree — consider "drivers"? #696.http.Handler, usable fromhttptestin this repo's tests and importable by downstream projects.Next steps
I would like to contribute this incrementally:
go build ./...and the existing tests green.Would the maintainers be open to this direction?