This is an automated email from the ASF dual-hosted git repository.
HTHou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iotdb-client-go.git
The following commit(s) were added to refs/heads/main by this push:
new bc2f49d Upgrade thrift to 0.23.0 (#160)
bc2f49d is described below
commit bc2f49dacf2825a04abd756983a33a550a29768c
Author: Haonan <[email protected]>
AuthorDate: Fri Jun 12 15:30:20 2026 +0800
Upgrade thrift to 0.23.0 (#160)
---
.github/workflows/go.yml | 7 ++-----
LICENSE-binary | 2 +-
README.md | 16 ++++++++--------
README_ZH.md | 16 ++++++++--------
client/session.go | 2 +-
go.mod | 10 ++++++++--
go.sum | 17 ++---------------
test/e2e/Dockerfile.iotdb-client-go | 2 +-
8 files changed, 31 insertions(+), 41 deletions(-)
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
index 252044b..39648c3 100644
--- a/.github/workflows/go.yml
+++ b/.github/workflows/go.yml
@@ -25,10 +25,7 @@ jobs:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
- go: ['1.13', 'stable']
- exclude:
- - os: macos-latest
- go: '1.13'
+ go: ['1.25', 'stable']
steps:
- name: Check out code into the Go module directory
@@ -40,7 +37,7 @@ jobs:
- name: Get dependencies
run: |
- go get -v -t -d ./...
+ go mod download
- name: Install curl on Ubuntu
if: matrix.os == 'ubuntu-latest'
diff --git a/LICENSE-binary b/LICENSE-binary
index f9228d7..c082ab8 100644
--- a/LICENSE-binary
+++ b/LICENSE-binary
@@ -215,4 +215,4 @@ following license. See licenses/ for text of these licenses.
Apache Software Foundation License 2.0
--------------------------------------
-github.com/apache/[email protected]
+github.com/apache/[email protected]
diff --git a/README.md b/README.md
index aa73706..a963a8e 100644
--- a/README.md
+++ b/README.md
@@ -46,7 +46,7 @@ Apache IoTDB GitHub: <https://github.com/apache/iotdb>
## Prerequisites
- golang >= 1.13
+ golang >= 1.25
## How to Use the Client (Quick Start)
@@ -67,10 +67,10 @@ go run session_example.go
Without go mod
```sh
-# get thrift 0.15.0
+# get thrift 0.23.0
go get github.com/apache/thrift
cd $GOPATH/src/github.com/apache/thrift
-git checkout 0.15.0
+git checkout 0.23.0
mkdir -p $GOPATH/src/iotdb-client-go-example/session_example
cd $GOPATH/src/iotdb-client-go-example/session_example
@@ -158,26 +158,26 @@ if err == nil {
### Command Line Tools
-* golang >= 1.13
+* golang >= 1.25
* make >= 3.0
* curl >= 7.1.1
-* thrift 0.15.0
+* thrift 0.23.0
## Troubleshooting
### Thrift version compatibility issues
In the branch `rel/0.13` and earlier versions, the version of apache/thrift is
`v0.14.1`.
-In the latest version, apache/thrift has been upgraded to `v0.15.0`.
+In the latest version, apache/thrift has been upgraded to `v0.23.0`.
The two versions are not compatible on some interfaces. Using mismatched
version will cause compilation errors.
The interfaces changed in the two versions are as follows:
-1. `NewTSocketConf`. This function returns two values in the version `v0.14.1`
and only one value in the version `v0.15.0`.
+1. `NewTSocketConf`. This function returns two values in the version `v0.14.1`
and only one value in newer versions.
2. `NewTFramedTransport` has been deprecated, use `NewTFramedTransportConf`
instead.
-For more details, please take a look at this PR: [update thrift to 0.15.0 to
fit IoTDB 0.13.0](https://github.com/apache/iotdb-client-go/pull/41)
+For more details, please take a look at this PR: [thrift compatibility update
for IoTDB 0.13.0](https://github.com/apache/iotdb-client-go/pull/41)
### Parameter name mismatch with actual usage in function 'Open'
diff --git a/README_ZH.md b/README_ZH.md
index 89e368a..e856172 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -44,7 +44,7 @@ Apache IoTDB GitHub: https://github.com/apache/iotdb
## 环境准备
- golang >= 1.13
+ golang >= 1.25
## 如何使用 (快速上手)
@@ -65,10 +65,10 @@ go run session_example.go
不使用go mod,采用GOPATH
```sh
-# get thrift 0.15.0
+# get thrift 0.23.0
go get github.com/apache/thrift
cd $GOPATH/src/github.com/apache/thrift
-git checkout 0.15.0
+git checkout 0.23.0
mkdir -p $GOPATH/src/iotdb-client-go-example/session_example
cd $GOPATH/src/iotdb-client-go-example/session_example
@@ -154,25 +154,25 @@ if err == nil {
### 命令行工具
-* golang >= 1.13
+* golang >= 1.25
* make >= 3.0
* curl >= 7.1.1
-* thrift 0.15.0
+* thrift 0.23.0
## 疑难解答
### thrift 版本兼容性问题
分支`rel/0.13`以及更早前的版本中,apache/thrift的版本为`v0.14.1`。
-在更新的版本中,apache/thrift已经升级为`v0.15.0`。
+在更新的版本中,apache/thrift已经升级为`v0.23.0`。
这两个版本在一些接口上并不兼容,使用不对应的版本,会导致编译报错。
两个版本中有改动的接口如下:
-1. `NewTSocketConf`。该接口在`v0.14.1`版本中返回2个值,在`v0.15.0`版本中返回1个值。
+1. `NewTSocketConf`。该接口在`v0.14.1`版本中返回2个值,在更新版本中返回1个值。
2. `NewTFramedTransport`已弃用,改用为`NewTFramedTransportConf`。
-更多相关的内容可以参考这个PR:[update thrift to 0.15.0 to fit IoTDB
0.13.0](https://github.com/apache/iotdb-client-go/pull/41)
+更多相关的内容可以参考这个PR:[IoTDB 0.13.0 的 thrift
兼容性更新](https://github.com/apache/iotdb-client-go/pull/41)
### Open函数参数名称与实际功能不匹配的问题
diff --git a/client/session.go b/client/session.go
index fbdacd4..28b326e 100644
--- a/client/session.go
+++ b/client/session.go
@@ -100,7 +100,7 @@ func (s *Session) Open(enableRPCCompression bool,
connectionTimeoutInMs int) err
var err error
- // in thrift 0.14.1, this func returns two values; in thrift 0.15.0, it
returns one.
+ // In thrift 0.14.1, this func returns two values; in newer versions,
it returns one.
s.trans = thrift.NewTSocketConf(net.JoinHostPort(s.config.Host,
s.config.Port), &thrift.TConfiguration{
ConnectTimeout: time.Duration(connectionTimeoutInMs) *
time.Millisecond, // Use 0 for no timeout
})
diff --git a/go.mod b/go.mod
index caff166..f3f6709 100644
--- a/go.mod
+++ b/go.mod
@@ -1,8 +1,14 @@
module github.com/apache/iotdb-client-go/v2
-go 1.13
+go 1.25
require (
- github.com/apache/thrift v0.15.0
+ github.com/apache/thrift v0.23.0
github.com/stretchr/testify v1.8.2
)
+
+require (
+ github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/pmezard/go-difflib v1.0.0 // indirect
+ gopkg.in/yaml.v3 v3.0.1 // indirect
+)
diff --git a/go.sum b/go.sum
index e4c4107..ff6d3f8 100644
--- a/go.sum
+++ b/go.sum
@@ -1,9 +1,8 @@
-github.com/apache/thrift v0.15.0
h1:aGvdaR0v1t9XLgjtBYwxcBvBOTMqClzwE26CHOgjW1Y=
-github.com/apache/thrift v0.15.0/go.mod
h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU=
+github.com/apache/thrift v0.23.0
h1:wKR6YnefQSEnxpEfmgTPuJibNG4bF0p2TK34tHLWi3s=
+github.com/apache/thrift v0.23.0/go.mod
h1:zPt6WxgvTOM6hF92y8C+MkEM5LMxZuk4JcQOiU4Esvs=
github.com/davecgh/go-spew v1.1.0/go.mod
h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1
h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod
h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/golang/mock v1.5.0/go.mod
h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
github.com/pmezard/go-difflib v1.0.0
h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod
h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod
h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -13,18 +12,6 @@ github.com/stretchr/testify v1.7.1/go.mod
h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod
h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.2
h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
github.com/stretchr/testify v1.8.2/go.mod
h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod
h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod
h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod
h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod
h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod
h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod
h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod
h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod
h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod
h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod
h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod
h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod
h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/test/e2e/Dockerfile.iotdb-client-go
b/test/e2e/Dockerfile.iotdb-client-go
index 6b8c22f..1b57cde 100644
--- a/test/e2e/Dockerfile.iotdb-client-go
+++ b/test/e2e/Dockerfile.iotdb-client-go
@@ -17,7 +17,7 @@
# under the License.
#
-FROM golang:1.13-alpine
+FROM golang:1.25-alpine
ENV CGO_ENABLED=0
COPY . /go/src/github.com/apache/iotdb-client-go/