You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "luoyuxia (via GitHub)" <gi...@apache.org> on 2026/03/14 08:23:10 UTC
[PR] feat: introduce go binding [paimon-rust]
luoyuxia opened a new pull request, #132:
URL: https://github.com/apache/paimon-rust/pull/132
<!--
Thank you very much for contributing to Paimon Rust - we are happy that you want to help us improve it. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.
## Contribution Checklist
- Make sure that the pull request corresponds to a [GitHub issue](https://github.com/apache/paimon-rust/issues). Exceptions are made for typos in documentation or comments, which need no issue.
- Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
- Make sure that the change passes the automated tests, i.e., `cargo test` passes.
- Each pull request should address only one issue, not mix up code from multiple issues.
**(The sections below can be removed for hotfixes or typos)**
-->
### Purpose
<!-- Linking this pull request to the issue -->
Linked issue: close #xxx
<!-- What is the purpose of the change -->
### Brief change log
<!-- Please describe the changes made in this pull request and explain how they address the issue -->
### Tests
<!-- List unit tests or integration cases to verify this change -->
### API and Format
<!-- Does this change affect API or storage format -->
### Documentation
<!-- Does this change introduce a new feature or require documentation updates -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: introduce go binding [paimon-rust]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #132:
URL: https://github.com/apache/paimon-rust/pull/132
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: introduce go binding [paimon-rust]
Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia commented on PR #132:
URL: https://github.com/apache/paimon-rust/pull/132#issuecomment-4061999173
I'll add build & reelase pipline in the next follow pr, and it only support mac/linux, if needed, I can support window in next pr.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: introduce go binding [paimon-rust]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #132:
URL: https://github.com/apache/paimon-rust/pull/132#issuecomment-4065212595
+1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: introduce go binding [paimon-rust]
Posted by "XiaoHongbo-Hope (via GitHub)" <gi...@apache.org>.
XiaoHongbo-Hope commented on PR #132:
URL: https://github.com/apache/paimon-rust/pull/132#issuecomment-4062587877
+1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat: introduce go binding [paimon-rust]
Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia commented on code in PR #132:
URL: https://github.com/apache/paimon-rust/pull/132#discussion_r2934939353
##########
bindings/go/tests/paimon_test.go:
##########
@@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package paimon_test
+
+import (
+ "os"
+ "sort"
+ "testing"
+
+ "github.com/apache/arrow-go/v18/arrow/array"
+ "github.com/apache/arrow-go/v18/arrow/cdata"
+ paimon "github.com/apache/paimon-rust/bindings/go"
+)
+
+// TestReadLogTable reads the test table and verifies the data matches expected values.
+//
+// The table was populated by Docker provisioning with:
+//
+// (1, 'alice'), (2, 'bob'), (3, 'carol')
+func TestReadLogTable(t *testing.T) {
+ warehouse := os.Getenv("PAIMON_TEST_WAREHOUSE")
+ if warehouse == "" {
+ warehouse = "/Users/yuxia/Projects/rust-projects/paimon-rust/dev/paimon-warehouse"
+ }
+
+ if _, err := os.Stat(warehouse); os.IsNotExist(err) {
+ t.Skipf("Skipping: warehouse %s does not exist (run 'make docker-up' first)", warehouse)
+ }
+
+ p, err := paimon.Open()
+ if err != nil {
+ t.Fatalf("Failed to open paimon: %v", err)
+ }
+ defer p.Close()
+
+ catalog, err := p.NewFileSystemCatalog(warehouse)
Review Comment:
Will introduce some thing like catalog factory to create filesystem catalog instead of hard coding to `NewFileSystemCatalog`.
Now, let's just make go works.
##########
bindings/go/tests/paimon_test.go:
##########
@@ -0,0 +1,163 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package paimon_test
+
+import (
+ "errors"
+ "io"
+ "os"
+ "sort"
+ "testing"
+
+ "github.com/apache/arrow-go/v18/arrow/array"
+ paimon "github.com/apache/paimon-rust/bindings/go"
+)
+
+// TestReadLogTable reads the test table and verifies the data matches expected values.
+//
+// The table was populated by Docker provisioning with:
+//
+// (1, 'alice'), (2, 'bob'), (3, 'carol')
+func TestReadLogTable(t *testing.T) {
Review Comment:
the current api design follow python & java client. Myabe in the future we can consider have a simpler(but may not flexiable) api like:
```
tbl, err := paimon.OpenTable(path, paimon.NewIdentifier("default", "t1"))
if err != nil { return err }
defer tbl.Close()
reader, err := tbl.NewRecordReader(ctx)
if err != nil { return err }
defer reader.Close()
for {
rec, err := reader.NextRecord()
...
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org