Release v0.3.0
fix: Writing Avro for Spark (#435)

Turns out that the Java Iceberg implementation *requires* the Avro field
names to match exactly instead of only relying on the
field-ids/element-ids.

In this case, the issue is the Partition Field Summary element records.
It appears that all "struct" types in iceberg java are expected to be
named ["r" +
fieldID](https://github.com/apache/iceberg/blob/a7f3dc79a2f42a4875ac35eec2137ecff15204fc/core/src/main/java/org/apache/iceberg/avro/TypeToSchema.java#L100-L105)
and if you don't name it appropriately, Spark throws a very unhelpful
exception (`ArrayStoreException`).

This was causing anything best on Java Iceberg to fail when reading Avro
written by Iceberg-Go.

fixes #434
8 files changed
tree: 2eff8367fda4273f8dc738536cf47eab201b6b7f
  1. .github/
  2. catalog/
  3. cmd/
  4. config/
  5. dev/
  6. internal/
  7. io/
  8. table/
  9. utils/
  10. .asf.yaml
  11. .gitattributes
  12. .gitignore
  13. .golangci.bck.yml
  14. .golangci.yml
  15. .pre-commit-config.yaml
  16. errors.go
  17. exprs.go
  18. exprs_test.go
  19. go.mod
  20. go.sum
  21. LICENSE
  22. literals.go
  23. literals_test.go
  24. manifest.go
  25. manifest_test.go
  26. name_mapping.go
  27. name_mapping_test.go
  28. NOTICE
  29. operation_string.go
  30. partitions.go
  31. partitions_test.go
  32. predicates.go
  33. README.md
  34. schema.go
  35. schema_conversions.go
  36. schema_test.go
  37. transforms.go
  38. transforms_test.go
  39. types.go
  40. types_test.go
  41. utils.go
  42. visitors.go
  43. visitors_test.go
README.md

Iceberg Golang

Go Reference

iceberg is a Golang implementation of the Iceberg table spec.

Build From Source

Prerequisites

  • Go 1.23 or later

Build

$ git clone https://github.com/apache/iceberg-go.git
$ cd iceberg-go/cmd/iceberg && go build .

Feature Support / Roadmap

FileSystem Support

Filesystem TypeSupported
S3X
Google Cloud StorageX
Azure Blob StorageX
Local FilesystemX

Metadata

OperationSupported
Get SchemaX
Get SnapshotsX
Get Sort OrdersX
Get Partition SpecsX
Get ManifestsX
Create New ManifestsX
Plan Scanx
Plan Scan for Snapshotx

Catalog Support

OperationRESTHiveDynamoDBGlueSQL
Load TableXXX
List TablesXXX
Create TableXXX
Register TableXX
Update Current SnapshotXX
Create New SnapshotXX
Rename TableXXX
Drop TableXXX
Alter TableXXX
Check Table ExistsXXX
Set Table PropertiesXXX
List NamespacesXXX
Create NamespaceXXX
Check Namespace ExistsXXX
Drop NamespaceXXX
Update Namespace PropertiesXXX
Create ViewX
List ViewX
Drop ViewX
Check View ExistsX

Read/Write Data Support

  • Data can currently be read as an Arrow Table or as a stream of Arrow record batches.

Supported Write Operations

As long as the FileSystem is supported and the Catalog supports altering the table, the following tracks the current write support:

OperationSupported
Append StreamX
Append Data FilesX
Rewrite Files
Rewrite manifests
Overwrite Files
Write Pos Delete
Write Eq Delete
Row Delta

CLI Usage

Run go build ./cmd/iceberg from the root of this repository to build the CLI executable, alternately you can run go install github.com/apache/iceberg-go/cmd/iceberg to install it to the bin directory of your GOPATH.

The iceberg CLI usage is very similar to pyiceberg CLI
You can pass the catalog URI with --uri argument.

Example: You can start the Iceberg REST API docker image which runs on default in port 8181

docker pull apache/iceberg-rest-fixture:latest
docker run -p 8181:8181 apache/iceberg-rest-fixture:latest

and run the iceberg CLI pointing to the REST API server.

 ./iceberg --uri http://0.0.0.0:8181 list
┌─────┐
| IDs |
| --- |
└─────┘

Create Namespace

./iceberg --uri http://0.0.0.0:8181 create namespace taxitrips

List Namespace

 ./iceberg --uri http://0.0.0.0:8181 list
┌───────────┐
| IDs       |
| --------- |
| taxitrips |
└───────────┘


Get in Touch