Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ go/adbc/drivermgr/adbc_driver_manager_driver_loading.cc linguist-generated
go/adbc/drivermgr/adbc_driver_manager_internal.h linguist-generated
go/adbc/drivermgr/adbc_driver_manager_profiles.cc linguist-generated
go/adbc/drivermgr/current_arch.h linguist-generated
go/adbc/pkg/flightsql/* linguist-generated
go/adbc/flightsql/pkg/* linguist-generated
go/adbc/pkg/panicdummy/* linguist-generated
python/adbc_driver_flightsql/adbc_driver_flightsql/_static_version.py export-subst
python/adbc_driver_manager/adbc_driver_manager/_static_version.py export-subst
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/native-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -616,10 +616,10 @@ jobs:
run: |
export PATH=$RUNNER_TOOL_CACHE/go/${GO_VERSION}/x64/bin:$PATH
# Can't use Docker on macOS
pushd $(pwd)/go/adbc
go build -o testserver ./driver/flightsql/cmd/testserver
pushd $(pwd)/go/flightsql
go build -o testserver ./cmd/testserver
popd
$(pwd)/go/adbc/testserver -host 0.0.0.0 -port 41414 &
$(pwd)/go/flightsql/testserver -host 0.0.0.0 -port 41414 &
while ! curl --http2-prior-knowledge -H "content-type: application/grpc" -v localhost:41414 -XPOST;
do
echo "Waiting for test server..."
Expand Down
27 changes: 27 additions & 0 deletions .golangci.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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.

version = "2"

[formatters]
enable = [
"gofmt",
]

[linters.settings.govet]
# appears to be broken in go 1.27
disable = ["inline"]
7 changes: 6 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,16 @@ repos:
- "--linelength=90"
- "--verbose=2"
- repo: https://github.com/golangci/golangci-lint
rev: 72798d34b1eb36745915b0d4eea5c2b3b31bdfe3 # frozen: v2.9.0
rev: c4e8435b673b0c51918007429309bf9d3cbca904 # frozen: v2.13.2
hooks:
- id: golangci-lint
name: "lint go/adbc"
entry: bash -c 'cd go/adbc && golangci-lint run --fix --timeout 5m'
types_or: [go, go-mod]
- id: golangci-lint
name: "lint go/flightsql"
entry: bash -c 'cd go/flightsql && golangci-lint run --fix --timeout 5m'
types_or: [go, go-mod]
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: a6273196190bb0f68caf1dc68073cf62c719f725 # v2.14.0
hooks:
Expand Down
2 changes: 1 addition & 1 deletion c/driver/flightsql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
include(GoUtils)

set(LDFLAGS "$<$<CONFIG:Release>:-s> $<$<CONFIG:Release>:-w>")
add_go_lib("${REPOSITORY_ROOT}/go/adbc/pkg/flightsql/"
add_go_lib("${REPOSITORY_ROOT}/go/flightsql/pkg"
adbc_driver_flightsql
SOURCES
driver.go
Expand Down
2 changes: 1 addition & 1 deletion c/driver/flightsql/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ adbc_driver_flightsql_lib = custom_target(
golang,
'build',
'-C',
meson.project_source_root() + '/../go/adbc/pkg/flightsql',
meson.project_source_root() + '/../go/flightsql/pkg',
'-tags=driverlib',
'-buildmode=c-shared',
'-o',
Expand Down
13 changes: 8 additions & 5 deletions ci/scripts/go_build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,25 @@ $BuildDir = $Args[1]
$InstallDir = if ($Args[2] -ne $null) { $Args[2] } else { Join-Path $BuildDir "local/" }

$GoDir = Join-Path $SourceDir "go" "adbc"
$FlightSqlDir = Join-Path $SourceDir "go" "flightsql"

Push-Location $GoDir
go build -v ./...
if (-not $?) { exit 1 }
Pop-Location

Push-Location $FlightSqlDir
go build -v ./...
if (-not $?) { exit 1 }
Pop-Location

if ($env:CGO_ENABLED -eq "1") {
Push-Location pkg
Push-Location $FlightSqlDir
go build `
-tags driverlib `
-o adbc_driver_flightsql.dll `
-buildmode=c-shared `
./flightsql
./pkg
if (-not $?) { exit 1 }

Pop-Location
}

Pop-Location
6 changes: 5 additions & 1 deletion ci/scripts/go_test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,14 @@ if ($env:CGO_ENABLED -eq "1") {
}

$GoDir = Join-Path $SourceDir "go" "adbc"
$FlightSqlDir = Join-Path $SourceDir "go" "flightsql"

Push-Location $GoDir

go test -v ./...
if (-not $?) { exit 1 }
Pop-Location

Push-Location $FlightSqlDir
go test -v ./...
if (-not $?) { exit 1 }
Pop-Location
4 changes: 2 additions & 2 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ services:
oauth-server:
condition: service_healthy
command: >-
/bin/bash -c "cd /adbc/go/adbc && go run ./driver/flightsql/cmd/testserver -host 0.0.0.0 -port 41414 -token-prefix oauth- -tls"
/bin/bash -c "cd /adbc/go/flightsql && go run ./cmd/testserver -host 0.0.0.0 -port 41414 -token-prefix oauth- -tls"

# OAuth test server for FlightSQL OAuth authentication testing
oauth-server:
Expand All @@ -317,7 +317,7 @@ services:
volumes:
- .:/adbc:delegated
command: >-
/bin/bash -c "cd /adbc/go/adbc && go run ./driver/flightsql/cmd/oauthserver -host 0.0.0.0 -port 8181 -client-id test-client -client-secret test-secret"
/bin/bash -c "cd /adbc/go/flightsql && go run ./cmd/oauthserver -host 0.0.0.0 -port 8181 -client-id test-client -client-secret test-secret"

flightsql-sqlite-test:
image: ${REPO}:golang-${GO}-sqlite-flightsql
Expand Down
1 change: 1 addition & 0 deletions dev/release/rat_exclude_files.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ go/adbc/drivermgr/adbc_driver_manager.h
go/adbc/status_string.go
go/adbc/infocode_string.go
go/adbc/go.sum
go/flightsql/go.sum
java/.mvn/jvm.config
python/*/*/py.typed
rat.txt
Expand Down
2 changes: 1 addition & 1 deletion docs/source/driver/flight_sql.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ the :c:struct:`AdbcDatabase`.
.. tab-item:: Go
:sync: go

.. recipe:: ../../../go/adbc/driver/flightsql/example_usage_test.go
.. recipe:: ../../../go/flightsql/example_usage_test.go

URI Format
----------
Expand Down
2 changes: 1 addition & 1 deletion docs/source/driver/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ driver in the table below is packaged this way.
* - :doc:`Apache Arrow Flight SQL <flight_sql>` [#compat-flightsql]_
- ``flightsql``
- ASF
- :iconlink:`fa-brands fa-github|https://github.com/apache/arrow-adbc/tree/main/go/adbc/driver/flightsql|GitHub repository`
- :iconlink:`fa-brands fa-github|https://github.com/apache/arrow-adbc/tree/main/go/flightsql|GitHub repository`
* - `Microsoft SQL Server <https://adbc-drivers.org/drivers/mssql/>`__
- ``mssql``
- Foundry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
"strings"

"github.com/apache/arrow-adbc/go/adbc"
"github.com/apache/arrow-adbc/go/adbc/driver/internal"
"github.com/apache/arrow-go/v18/arrow"
"github.com/apache/arrow-go/v18/arrow/array"
"github.com/apache/arrow-go/v18/arrow/memory"
Expand Down Expand Up @@ -153,7 +152,7 @@ func (base *ConnectionImplBase) Rollback(context.Context) error {
}

func (base *ConnectionImplBase) GetInfo(ctx context.Context, infoCodes []adbc.InfoCode) (reader array.RecordReader, err error) {
_, _, endSpanHelper := internal.StartSpanWithEndSpanHelper(ctx, "ConnectionImplBase.GetInfo", base)
_, _, endSpanHelper := StartSpanWithEndSpanHelper(ctx, "ConnectionImplBase.GetInfo", base)
defer func() {
endSpanHelper.WithError(err).EndSpan()
}()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"testing"

"github.com/apache/arrow-adbc/go/adbc"
"github.com/apache/arrow-adbc/go/adbc/driver/internal/driverbase"
"github.com/apache/arrow-adbc/go/adbc/driver/driverbase"
"github.com/stretchr/testify/require"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"testing"

"github.com/apache/arrow-adbc/go/adbc"
"github.com/apache/arrow-adbc/go/adbc/driver/internal/driverbase"
"github.com/apache/arrow-adbc/go/adbc/driver/driverbase"
"github.com/apache/arrow-adbc/go/adbc/validation"
"github.com/apache/arrow-go/v18/arrow"
"github.com/apache/arrow-go/v18/arrow/array"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"runtime"
"testing"

"github.com/apache/arrow-adbc/go/adbc/driver/internal/driverbase"
"github.com/apache/arrow-adbc/go/adbc/driver/driverbase"
"github.com/stretchr/testify/require"
)

Expand Down
Loading
Loading