Skip to content

ci: add release pipeline for go binding#138

Merged
JingsongLi merged 2 commits intoapache:mainfrom
luoyuxia:add-release-go-pipleline1
Mar 16, 2026
Merged

ci: add release pipeline for go binding#138
JingsongLi merged 2 commits intoapache:mainfrom
luoyuxia:add-release-go-pipleline1

Conversation

@luoyuxia
Copy link
Contributor

Purpose

Linked issue: close #136

Support publishing the Go binding as a proper Go submodule release so users can install it directly via
github.com/apache/paimon-rust/bindings/go.

This change adds a dedicated Go binding release workflow, documents the tagging strategy, and clarifies the release process for
both RC and GA versions.

Brief change log

  • Add a dedicated GitHub Actions workflow to release the Go binding with submodule tags such as bindings/go/vX.Y.Z and bindings/
    go/vX.Y.Z-rc.N.
  • Add source_ref input to the workflow so each Go binding release is explicitly tied to a reviewed Rust release baseline.
  • Build and package embedded paimon-c shared libraries for:
    • linux/amd64
    • linux/arm64
    • darwin/amd64
    • darwin/arm64
  • Add a detailed release checklist in bindings/go/RELEASE.md, including:
    • tagging strategy
    • RC/GA version conventions
    • release validation steps
    • baseline tracking guidance

Tests

N/A

API and Format

N/A

Documentation

  • Add bindings/go/RELEASE.md to document the release checklist and tagging strategy.

@luoyuxia
Copy link
Contributor Author

I already verify it in my own paimon-rust fork. See https://github.com/luoyuxia/paimon-rust/releases/tag/bindings%2Fgo%2Fv0.1.2
Verified with the following code:

package main

import (
	"errors"
	"fmt"
	"io"
	"log"
	"os"

	"github.com/apache/arrow-go/v18/arrow/array"
	paimon "github.com/luoyuxia/paimon-rust/bindings/go"
)

// TIP <p>To run your code, right-click the code and select <b>Run</b>.</p> <p>Alternatively, click
// the <icon src="AllIcons.Actions.Execute"/> icon in the gutter and select the <b>Run</b> menu item from here.</p>
func main() {
	warehouse := os.Getenv("PAIMON_TEST_WAREHOUSE")
	if warehouse == "" {
		warehouse = "/Users/yuxia/Projects/rust-projects/paimon-rust/dev/paimon-warehouse"
	}

	catalog, err := paimon.NewFileSystemCatalog(warehouse)
	if err != nil {
		log.Fatalf("Failed to create catalog: %v", err)
	}
	defer catalog.Close()

	table, err := catalog.GetTable(paimon.NewIdentifier("default", "simple_log_table"))
	if err != nil {
		log.Fatalf("Failed to get table: %v", err)
	}
	defer table.Close()

	rb, err := table.NewReadBuilder()
	if err != nil {
		log.Fatalf("Failed to create read builder: %v", err)
	}
	defer rb.Close()

	scan, err := rb.NewScan()
	if err != nil {
		log.Fatalf("Failed to create scan: %v", err)
	}
	defer scan.Close()

	plan, err := scan.Plan()
	if err != nil {
		log.Fatalf("Failed to plan: %v", err)
	}
	defer plan.Close()

	splits := plan.Splits()
	if len(splits) == 0 {
		log.Fatal("Expected at least one split")
	}

	read, err := rb.NewRead()
	if err != nil {
		log.Fatalf("Failed to create table read: %v", err)
	}
	defer read.Close()

	reader, err := read.NewRecordBatchReader(splits)
	if err != nil {
		log.Fatalf("Failed to create record batch reader: %v", err)
	}
	defer reader.Close()
	batchIdx := 0
	type row struct {
		id   int32
		name string
	}
	var rows []row
	for {
		record, err := reader.NextRecord()
		if errors.Is(err, io.EOF) {
			break
		}
		if err != nil {
			log.Fatalf("Batch %d: failed to read next record: %v", batchIdx, err)
		}

		idIdx := record.Schema().FieldIndices("id")
		nameIdx := record.Schema().FieldIndices("name")
		if len(idIdx) == 0 || len(nameIdx) == 0 {
			record.Release()
			log.Fatalf("Batch %d: missing expected columns (id, name) in schema: %s", batchIdx, record.Schema())
		}

		idCol := record.Column(idIdx[0]).(*array.Int32)
		nameCol := record.Column(nameIdx[0]).(*array.String)

		for j := 0; j < int(record.NumRows()); j++ {
			rows = append(rows, row{
				id:   idCol.Value(j),
				name: string([]byte(nameCol.Value(j))),
			})
		}
		record.Release()
		batchIdx++
	}

	fmt.Printf("%+v\n", rows)
}

@XiaoHongbo-Hope
Copy link

+1

@JingsongLi JingsongLi merged commit 7d52915 into apache:main Mar 16, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

introduce go binding release ci pipleine

3 participants