Skip to content

Commit

Permalink
chore: update dependencies (#126)
Browse files Browse the repository at this point in the history
* Upgrade to Arrow 18
* Upgrade to DuckDB 1.1.3
* Execute DISTINCT using DuckDB
* test: skip order-undefined queries
  • Loading branch information
fanyang01 authored Nov 7, 2024
1 parent b84c3e2 commit 4927952
Show file tree
Hide file tree
Showing 14 changed files with 77 additions and 69 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
pip3 install "sqlglot[rs]"
curl -LJO https://github.com/duckdb/duckdb/releases/download/v1.1.2/duckdb_cli-linux-amd64.zip
curl -LJO https://github.com/duckdb/duckdb/releases/download/v1.1.3/duckdb_cli-linux-amd64.zip
unzip duckdb_cli-linux-amd64.zip
chmod +x duckdb
sudo mv duckdb /usr/local/bin
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/psql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
pip3 install "sqlglot[rs]"
curl -LJO https://github.com/duckdb/duckdb/releases/download/v1.1.2/duckdb_cli-linux-amd64.zip
curl -LJO https://github.com/duckdb/duckdb/releases/download/v1.1.3/duckdb_cli-linux-amd64.zip
unzip duckdb_cli-linux-amd64.zip
chmod +x duckdb
sudo mv duckdb /usr/local/bin
Expand Down
14 changes: 2 additions & 12 deletions backend/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,6 @@ func (b *DuckBuilder) Build(ctx *sql.Context, root sql.Node, r sql.Row) (sql.Row
}

n := root
qp, ok := n.(*plan.QueryProcess)
if ok {
n = qp.Child()
}
tc, ok := n.(*plan.TransactionCommittingNode)
if ok {
n = tc.Child()
}
rua, ok := n.(*plan.RowUpdateAccumulator)
if ok {
n = rua.Child()
}
ctx.GetLogger().WithFields(logrus.Fields{
"Query": ctx.Query(),
"NodeType": fmt.Sprintf("%T", n),
Expand Down Expand Up @@ -126,6 +114,8 @@ func (b *DuckBuilder) Build(ctx *sql.Context, root sql.Node, r sql.Row) (sql.Row
// SubqueryAlias is for select * from view
case *plan.ResolvedTable, *plan.SubqueryAlias, *plan.TableAlias:
return b.executeQuery(ctx, node, conn)
case *plan.Distinct, *plan.OrderedDistinct:
return b.executeQuery(ctx, node, conn)
case sql.Expressioner:
return b.executeExpressioner(ctx, node, conn)
case *plan.DeleteFrom:
Expand Down
8 changes: 4 additions & 4 deletions binlog/rbr.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ import (
"math/big"
"time"

"github.com/apache/arrow/go/v17/arrow"
"github.com/apache/arrow/go/v17/arrow/array"
"github.com/apache/arrow/go/v17/arrow/decimal128"
"github.com/apache/arrow/go/v17/arrow/decimal256"
"github.com/apache/arrow-go/v18/arrow"
"github.com/apache/arrow-go/v18/arrow/array"
"github.com/apache/arrow-go/v18/arrow/decimal128"
"github.com/apache/arrow-go/v18/arrow/decimal256"
"github.com/apecloud/myduckserver/charset"
"github.com/cockroachdb/apd/v3"
"github.com/dolthub/go-mysql-server/sql"
Expand Down
2 changes: 1 addition & 1 deletion binlogreplication/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package binlogreplication
import (
stdsql "database/sql"

"github.com/apache/arrow/go/v17/arrow/array"
"github.com/apache/arrow-go/v18/arrow/array"
"github.com/apecloud/myduckserver/binlog"
"github.com/apecloud/myduckserver/delta"
"github.com/dolthub/go-mysql-server/sql"
Expand Down
2 changes: 1 addition & 1 deletion delta/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"sync"
"unsafe"

"github.com/apache/arrow/go/v17/arrow/ipc"
"github.com/apache/arrow-go/v18/arrow/ipc"
"github.com/apecloud/myduckserver/backend"
"github.com/apecloud/myduckserver/binlog"
"github.com/apecloud/myduckserver/catalog"
Expand Down
4 changes: 2 additions & 2 deletions delta/delta.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package delta

import (
"github.com/apache/arrow/go/v17/arrow"
"github.com/apache/arrow/go/v17/arrow/array"
"github.com/apache/arrow-go/v18/arrow"
"github.com/apache/arrow-go/v18/arrow/array"
"github.com/apecloud/myduckserver/myarrow"
"github.com/dolthub/go-mysql-server/sql"
"github.com/dolthub/go-mysql-server/sql/types"
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ RUN if [ "$TARGETARCH" = "arm64" ]; then \
else \
ARCH="amd64"; \
fi && \
curl -LJO https://github.com/duckdb/duckdb/releases/download/v1.0.0/duckdb_cli-linux-$ARCH.zip \
curl -LJO https://github.com/duckdb/duckdb/releases/download/v1.1.3/duckdb_cli-linux-$ARCH.zip \
&& unzip duckdb_cli-linux-$ARCH.zip \
&& chmod +x duckdb \
&& mv duckdb /usr/local/bin \
Expand Down
24 changes: 12 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,30 @@ go 1.23.2

require (
github.com/Shopify/toxiproxy/v2 v2.9.0
github.com/apache/arrow/go/v17 v17.0.0
github.com/apache/arrow-go/v18 v18.0.0
github.com/cockroachdb/apd/v3 v3.2.1
github.com/cockroachdb/cockroachdb-parser v0.23.2
github.com/dolthub/doltgresql v0.13.0
github.com/dolthub/go-mysql-server v0.18.2-0.20241018220726-63ed221b1772
github.com/dolthub/vitess v0.0.0-20241016191424-d14e107a654e
github.com/dolthub/go-mysql-server v0.18.2-0.20241106010546-3281d09c1f15
github.com/dolthub/vitess v0.0.0-20241104125316-860772ba6683
github.com/go-sql-driver/mysql v1.8.1
github.com/jackc/pgx/v5 v5.7.1
github.com/jmoiron/sqlx v1.4.0
github.com/lib/pq v1.10.9
github.com/marcboeker/go-duckdb v1.8.2-0.20241002112231-62d5fa8c0697
github.com/marcboeker/go-duckdb v1.8.3
github.com/prometheus/client_golang v1.20.3
github.com/rs/zerolog v1.33.0
github.com/shopspring/decimal v1.3.1
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.9.0
golang.org/x/text v0.18.0
golang.org/x/text v0.19.0
gopkg.in/src-d/go-errors.v1 v1.0.0
vitess.io/vitess v0.21.0
)

replace (
github.com/dolthub/go-mysql-server v0.18.2-0.20241018220726-63ed221b1772 => github.com/fanyang01/go-mysql-server v0.0.0-20241021025444-83e2e88c99aa
github.com/dolthub/vitess v0.0.0-20241016191424-d14e107a654e => github.com/apecloud/dolt-vitess v0.0.0-20241028060845-4a2a0444a0ac
github.com/dolthub/go-mysql-server v0.18.2-0.20241106010546-3281d09c1f15 => github.com/fanyang01/go-mysql-server v0.0.0-20241107083514-e7c2ac20ddba
github.com/dolthub/vitess v0.0.0-20241104125316-860772ba6683 => github.com/apecloud/dolt-vitess v0.0.0-20241107081545-d894da3857d8
)

require (
Expand Down Expand Up @@ -62,7 +62,7 @@ require (
github.com/gorilla/mux v1.8.1 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
Expand Down Expand Up @@ -96,14 +96,14 @@ require (
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/tools v0.25.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/tools v0.26.0 // indirect
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/grpc v1.66.2 // indirect
google.golang.org/protobuf v1.34.2 // indirect
google.golang.org/grpc v1.67.1 // indirect
google.golang.org/protobuf v1.35.1 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit 4927952

Please sign in to comment.