Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
47a8379
Initial support for queries with Apache Arrow ResultSets
kprokopenko Jun 16, 2025
cde72ea
Fix indentation in README
kprokopenko Jun 16, 2025
5bd2579
fix README
kprokopenko Jun 16, 2025
4eec9a9
fix README
kprokopenko Jun 16, 2025
8cd09b5
fixes from code review
kprokopenko Jun 16, 2025
1030dff
fixes from code review
kprokopenko Jun 16, 2025
d726bbd
Add Close method to ArrowResult
kprokopenko Jun 16, 2025
eeeda8b
Add Bytes() method to ArrowPart
kprokopenko Jul 11, 2025
3595ee5
styling fixes
kprokopenko Sep 11, 2025
ee3e034
fixes
kprokopenko Sep 11, 2025
12770a6
Release v3.110.1
Jun 16, 2025
055b6f7
docs: enhance contributing guide with Dev Containers and GitHub Codes…
polRk Jun 17, 2025
84476c8
* Added `sugar.PrintErrorWithoutStack` and `sugar.UnwrapError` helper…
asmyasnikov Jun 23, 2025
653842a
Release v3.111.0
Jun 23, 2025
18668c3
Migrate `golangci-lint` to v2
4el0ve4ek Jun 26, 2025
ad65ffc
The Go version has been downgraded to 1.22 (#1820)
kprokopenko Jun 26, 2025
8cbb3c3
Release v3.111.1
Jun 26, 2025
5d1e6c8
Fixed variables in slo-report workflow
kprokopenko Jun 27, 2025
58264e6
Changed discovery and dns resolving log level to DEBUG (#1823)
qrort Jun 27, 2025
2cd2d50
Release v3.111.2
Jun 27, 2025
eec15fc
set session status when closeOnce() is called instead of Close() (#1…
qrort Jun 30, 2025
240d6fa
Release v3.111.3
Jun 30, 2025
035c982
Switch `ydb-slo-action` to `main` branch in `slo-reports`
kprokopenko Jul 3, 2025
05cc008
Support for server-side load balancing of sessions (#1813)
kprokopenko Jul 4, 2025
d6253f7
fixed redundant defer in sessionCore.closeOnce (#1817)
asmyasnikov Jul 6, 2025
80fae6d
added json unmarshaler for castTo (#1825)
flymedllva Jul 6, 2025
9d6a3bf
Release v3.112.0
Jul 6, 2025
49e8086
Execute queries without explicit session creation (#1827)
kprokopenko Jul 11, 2025
bb79a18
Fixed respect start offset from topicoptions.WithReaderGetPartitionSt…
rekby Jul 14, 2025
62c12cb
Fix format
rekby Jul 15, 2025
39edca4
Disable optimistic unban nodes after pessimization
Jul 10, 2025
730cf73
Apply suggestions from code review
asmyasnikov Jul 10, 2025
96d76cf
Update config/config.go
dcherednik Jul 10, 2025
03161b1
update CHANGELOG.md
Jul 10, 2025
7e79256
Update config/config.go
asmyasnikov Jul 10, 2025
82ca6cd
Update config/config.go
asmyasnikov Jul 10, 2025
60b178f
Update config/config.go
asmyasnikov Jul 10, 2025
5b3a6e6
rebase, auto format
qrort Jul 15, 2025
a7c9ff9
Update CHANGELOG.md
asmyasnikov Jul 17, 2025
7a17f1c
Release v3.113.0
Jul 17, 2025
0de804e
fix SLO test database-sql-query (#1836)
kprokopenko Jul 21, 2025
d91d98c
Release v3.113.1
Jul 21, 2025
97ef5a2
fix panic in database/sql traces (#1839)
qrort Jul 22, 2025
6e71dd9
Release v3.113.2
Jul 22, 2025
5b4d295
* Marked as non-retryable operation error `ABORTED` with internal iss…
asmyasnikov Jul 31, 2025
b4c09db
Release v3.113.3
Jul 31, 2025
6fb91dd
Failover unit test for DNS with unavailable IP addresses (#1840)
kprokopenko Jul 31, 2025
a3fbaad
Added original error to `listValue` and `setValue` cast error (#1844)
MLedium Aug 4, 2025
7059ac0
Release v3.113.4
Aug 4, 2025
be1d200
Fixed incorrect string conversion of `Uint64Value` values greater tha…
MLedium Aug 5, 2025
8960154
Release v3.113.5
Aug 5, 2025
132e5fe
Removed experimental from DoWithResult & DoTxWithResult (#1847)
1NepuNep1 Aug 8, 2025
fd58878
Release v3.113.6
Aug 13, 2025
638bf29
refactoring for pg2ydb project (#1846)
asmyasnikov Aug 14, 2025
a526ac0
Release v3.114.0
Aug 14, 2025
7aa3daf
Fix stack depth (#1849)
asmyasnikov Aug 17, 2025
4e7bce0
Release v3.114.1
Aug 17, 2025
1912f04
* Added public package `pkg/xtest` with test helpers (#1850)
asmyasnikov Aug 17, 2025
f8daa75
Release v3.115.0
Aug 17, 2025
332ca1e
* Added `ydb.Param.Range()` range iterator (#1852)
asmyasnikov Aug 26, 2025
9e56152
Release v3.115.1
Aug 26, 2025
6372c5d
Fix int (#1853)
asmyasnikov Aug 27, 2025
d0666d8
Release v3.115.2
Aug 27, 2025
c0b46ab
changelog + codestyle (#1851)
rorShaK03 Aug 27, 2025
128e55e
Release v3.115.3
Aug 27, 2025
a604ef3
Update README.md
asmyasnikov Sep 1, 2025
41460e9
Support for reusing one IP address and host name (#1854)
robdrynkin Sep 2, 2025
70f08cb
Release v3.115.4
Sep 2, 2025
f37e04a
Fix error logging for UpdateOffsetsInTransaction (#1856)
kprokopenko Sep 5, 2025
3c59b6c
Release v3.115.5
Sep 5, 2025
e115aea
Fix query result handling with streaming (#1855)
kprokopenko Sep 8, 2025
70854a0
Release v3.115.6
Sep 8, 2025
89eb446
Added support for `PartitionBy` in `DescribeTable` results (#1859)
kprokopenko Sep 10, 2025
c6a4126
Release v3.115.7
Sep 10, 2025
29b6dc1
add changelog
kprokopenko Sep 11, 2025
cbc1035
Merge branch 'master' into dev-arrow
kprokopenko Sep 11, 2025
8803cf5
fixes
kprokopenko Sep 11, 2025
f88f484
fix
kprokopenko Sep 11, 2025
d8244e7
fix
kprokopenko Sep 11, 2025
011496d
fix
kprokopenko Sep 11, 2025
6380fd2
fix
kprokopenko Sep 11, 2025
da4eba9
fixes
kprokopenko Sep 11, 2025
0202478
move to transactions
kprokopenko Sep 15, 2025
12a2e04
moved to session
kprokopenko Sep 15, 2025
ccc9ba4
fix
kprokopenko Sep 15, 2025
a17b9a4
Merge branch 'master' into dev-arrow
kprokopenko Sep 15, 2025
2d4129b
fix
kprokopenko Sep 15, 2025
b36d432
fix
kprokopenko Sep 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
* Added experimental support for query results in `Apache Arrow`
* Fix flaky unit test TestUnboundedChanContextTimeout

## v3.115.7
Expand Down
86 changes: 86 additions & 0 deletions examples/apache_arrow/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
// This example shows how you can get results in Apache Arrow format.
//
// Before starting add apache arrow IPC package:
//
// go get github.com/apache/arrow/go/arrow
//
// Currently (2025-09-11), Apache Arrow supported in the `main` YDB branch and
// enabled by feature flag `EnableArrowResultSetFormat`.
package main

import (
"context"
"fmt"

"github.com/apache/arrow/go/arrow/ipc"
"github.com/ydb-platform/ydb-go-sdk/v3"
"github.com/ydb-platform/ydb-go-sdk/v3/query"
)

func main() {
ctx := context.Background()
db, err := ydb.Open(ctx, "grpc://localhost:2136/local")
if err != nil {
panic(err)
}
defer db.Close(ctx) // cleanup resources

sql := `SELECT 42 as id, "my string" as myStr;
SELECT 24 as id, "WOW" as myStr, "UHH" as secondStr;`

err = db.Query().Do(ctx, func(ctx context.Context, s query.Session) error {
result, err := s.QueryArrow(ctx, sql)
if err != nil {
return err
}
defer result.Close(ctx)

for part, err := range result.Parts(ctx) {
if err != nil {
panic(err)
}

fmt.Printf("ResultSet#%d ", part.GetResultSetIndex())

// or you can use `part.Bytes()` instead of [io.Reader] interface

rdr, err := ipc.NewReader(part) // part already implements io.Reader
if err != nil {
panic(err)
}

for rdr.Next() {
out := rdr.Record()
fmt.Println(out)
}
}

return nil
}, query.WithIdempotent())
if err != nil {
panic(err)
}

// Output:
// ResultSet#0 record:
//
// schema:
// fields: 2
// - id: type=int32
// - myStr: type=binary
// rows: 1
// col[0][id]: [42]
// col[1][myStr]: ["my string"]
//
// ResultSet#1 record:
//
// schema:
// fields: 3
// - id: type=int32
// - myStr: type=binary
// - secondStr: type=binary
// rows: 1
// col[0][id]: [24]
// col[1][myStr]: ["WOW"]
// col[2][secondStr]: ["UHH"]
}
7 changes: 6 additions & 1 deletion examples/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go 1.23.0
toolchain go1.23.6

require (
github.com/apache/arrow/go/arrow v0.0.0-20211112161151-bc219186db40
github.com/golang-jwt/jwt/v4 v4.5.2
github.com/google/uuid v1.6.0
github.com/gorilla/mux v1.8.0
Expand Down Expand Up @@ -34,6 +35,7 @@ require (
github.com/goccy/go-json v0.10.3 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/flatbuffers v23.5.26+incompatible // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
Expand All @@ -43,27 +45,30 @@ require (
github.com/jinzhu/now v1.1.5 // indirect
github.com/jonboulle/clockwork v0.5.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.17.7 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-sqlite3 v1.14.16 // indirect
github.com/mfridman/interpolate v0.0.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/ncruces/go-strftime v0.1.9 // indirect
github.com/pierrec/lz4/v4 v4.1.21 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/common v0.53.0 // indirect
github.com/prometheus/procfs v0.14.0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/sethvargo/go-retry v0.3.0 // indirect
github.com/syndtr/goleveldb v1.0.0 // indirect
github.com/yandex-cloud/go-genproto v0.0.0-20220815090733-4c139c0154e2 // indirect
github.com/ydb-platform/ydb-go-genproto v0.0.0-20241112172322-ea1f63298f77 // indirect
github.com/ydb-platform/ydb-go-genproto v0.0.0-20250911135631-b3beddd517d9 // indirect
github.com/ydb-platform/ydb-go-yc-metadata v0.6.1 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.36.0 // indirect
golang.org/x/net v0.38.0 // indirect
golang.org/x/sys v0.31.0 // indirect
golang.org/x/text v0.23.0 // indirect
golang.org/x/tools v0.24.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241015192408-796eee8c2d53 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241015192408-796eee8c2d53 // indirect
google.golang.org/grpc v1.69.4 // indirect
Expand Down
Loading
Loading