From 4dd6d92aece05696436749ca11f4966b4d2faaeb Mon Sep 17 00:00:00 2001 From: David Li Date: Fri, 4 Sep 2026 11:49:38 +0900 Subject: [PATCH 1/9] feat!(go): split Flight SQL into its own module This way we don't leak CVEs/dependencies from the driver into the core ADBC package. Breaking changes: - package go/adbc/driver/flightsql => go/flightsql - package go/adbc/sqldriver/flightsql => go/flightsql/sqldriver Also, `driverbase` is now exposed. Closes #4623. --- .gitattributes | 2 +- .github/workflows/native-unix.yml | 6 +- .golangci.toml | 27 ++ .pre-commit-config.yaml | 7 +- c/driver/flightsql/CMakeLists.txt | 2 +- c/driver/flightsql/meson.build | 2 +- ci/scripts/go_build.ps1 | 13 +- ci/scripts/go_test.ps1 | 6 +- compose.yaml | 4 +- dev/release/rat_exclude_files.txt | 1 + docs/source/driver/flight_sql.rst | 2 +- docs/source/driver/index.rst | 2 +- .../{internal => }/driverbase/connection.go | 3 +- .../{internal => }/driverbase/database.go | 0 .../{internal => }/driverbase/driver.go | 0 .../{internal => }/driverbase/driver_info.go | 0 .../driverbase/driver_info_test.go | 2 +- .../{internal => }/driverbase/driver_test.go | 2 +- .../driver/{internal => }/driverbase/error.go | 0 .../{internal => }/driverbase/logging.go | 0 .../driverbase/rotating_file_writer.go | 0 .../driverbase/rotating_file_writer_test.go | 2 +- go/adbc/driver/driverbase/shared_utils.go | 282 +++++++++++++++++ .../{internal => }/driverbase/statement.go | 0 go/adbc/go.mod | 20 +- go/adbc/go.sum | 66 +--- go/adbc/pkg/Makefile | 6 +- .../flightsql/cmd/oauthserver/main.go | 0 .../flightsql/cmd/testserver/main.go | 0 .../flightsql/example_usage_test.go | 2 +- .../flightsql/flightsql_adbc_server_test.go | 16 +- .../flightsql/flightsql_adbc_test.go | 2 +- .../flightsql/flightsql_bulk_ingest.go | 4 +- .../flightsql/flightsql_connection.go | 35 +-- .../flightsql/flightsql_database.go | 11 +- .../driver => }/flightsql/flightsql_driver.go | 2 +- .../driver => }/flightsql/flightsql_oauth.go | 0 .../flightsql/flightsql_statement.go | 8 +- .../flightsql/flightsql_tracing.go | 0 .../get_objects.go} | 297 ++---------------- go/flightsql/go.mod | 81 +++++ go/flightsql/go.sum | 153 +++++++++ go/{adbc/driver => }/flightsql/logging.go | 0 .../driver => }/flightsql/logging_test.go | 0 .../pkg/flightsql => flightsql/pkg}/driver.go | 4 +- .../pkg/flightsql => flightsql/pkg}/init.go | 2 +- .../pkg/flightsql => flightsql/pkg}/utils.c | 0 .../pkg/flightsql => flightsql/pkg}/utils.h | 2 +- .../driver => }/flightsql/record_reader.go | 4 +- .../flightsql/record_reader_test.go | 0 .../sqldriver}/README.md | 6 +- .../sqldriver}/flightsql.go | 4 +- .../sqldriver}/flightsql_test.go | 2 +- go/{adbc/driver => }/flightsql/timeouts.go | 0 go/{adbc/driver => }/flightsql/tracing.go | 0 .../driver => }/flightsql/tracing_test.go | 4 +- go/{adbc/driver => }/flightsql/utils.go | 0 r/adbcflightsql/configure | 2 +- r/adbcflightsql/src/Makevars.in | 2 +- r/tools/bootstrap-go.R | 7 +- 60 files changed, 667 insertions(+), 440 deletions(-) create mode 100644 .golangci.toml rename go/adbc/driver/{internal => }/driverbase/connection.go (99%) rename go/adbc/driver/{internal => }/driverbase/database.go (100%) rename go/adbc/driver/{internal => }/driverbase/driver.go (100%) rename go/adbc/driver/{internal => }/driverbase/driver_info.go (100%) rename go/adbc/driver/{internal => }/driverbase/driver_info_test.go (97%) rename go/adbc/driver/{internal => }/driverbase/driver_test.go (99%) rename go/adbc/driver/{internal => }/driverbase/error.go (100%) rename go/adbc/driver/{internal => }/driverbase/logging.go (100%) rename go/adbc/driver/{internal => }/driverbase/rotating_file_writer.go (100%) rename go/adbc/driver/{internal => }/driverbase/rotating_file_writer_test.go (98%) create mode 100644 go/adbc/driver/driverbase/shared_utils.go rename go/adbc/driver/{internal => }/driverbase/statement.go (100%) rename go/{adbc/driver => }/flightsql/cmd/oauthserver/main.go (100%) rename go/{adbc/driver => }/flightsql/cmd/testserver/main.go (100%) rename go/{adbc/driver => }/flightsql/example_usage_test.go (98%) rename go/{adbc/driver => }/flightsql/flightsql_adbc_server_test.go (99%) rename go/{adbc/driver => }/flightsql/flightsql_adbc_test.go (99%) rename go/{adbc/driver => }/flightsql/flightsql_bulk_ingest.go (97%) rename go/{adbc/driver => }/flightsql/flightsql_connection.go (97%) rename go/{adbc/driver => }/flightsql/flightsql_database.go (97%) rename go/{adbc/driver => }/flightsql/flightsql_driver.go (99%) rename go/{adbc/driver => }/flightsql/flightsql_oauth.go (100%) rename go/{adbc/driver => }/flightsql/flightsql_statement.go (97%) rename go/{adbc/driver => }/flightsql/flightsql_tracing.go (100%) rename go/{adbc/driver/internal/shared_utils.go => flightsql/get_objects.go} (67%) create mode 100644 go/flightsql/go.mod create mode 100644 go/flightsql/go.sum rename go/{adbc/driver => }/flightsql/logging.go (100%) rename go/{adbc/driver => }/flightsql/logging_test.go (100%) rename go/{adbc/pkg/flightsql => flightsql/pkg}/driver.go (99%) rename go/{adbc/pkg/flightsql => flightsql/pkg}/init.go (96%) rename go/{adbc/pkg/flightsql => flightsql/pkg}/utils.c (100%) rename go/{adbc/pkg/flightsql => flightsql/pkg}/utils.h (99%) rename go/{adbc/driver => }/flightsql/record_reader.go (98%) rename go/{adbc/driver => }/flightsql/record_reader_test.go (100%) rename go/{adbc/sqldriver/flightsql => flightsql/sqldriver}/README.md (89%) rename go/{adbc/sqldriver/flightsql => flightsql/sqldriver}/flightsql.go (89%) rename go/{adbc/sqldriver/flightsql => flightsql/sqldriver}/flightsql_test.go (98%) rename go/{adbc/driver => }/flightsql/timeouts.go (100%) rename go/{adbc/driver => }/flightsql/tracing.go (100%) rename go/{adbc/driver => }/flightsql/tracing_test.go (98%) rename go/{adbc/driver => }/flightsql/utils.go (100%) diff --git a/.gitattributes b/.gitattributes index b9238e5972..f978657cc3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -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 diff --git a/.github/workflows/native-unix.yml b/.github/workflows/native-unix.yml index 901b6703b5..72a89f2e4b 100644 --- a/.github/workflows/native-unix.yml +++ b/.github/workflows/native-unix.yml @@ -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..." diff --git a/.golangci.toml b/.golangci.toml new file mode 100644 index 0000000000..f0a607bb84 --- /dev/null +++ b/.golangci.toml @@ -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"] diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b1e431512a..d57d646907 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: diff --git a/c/driver/flightsql/CMakeLists.txt b/c/driver/flightsql/CMakeLists.txt index 37c17efeea..0725ae90c4 100644 --- a/c/driver/flightsql/CMakeLists.txt +++ b/c/driver/flightsql/CMakeLists.txt @@ -18,7 +18,7 @@ include(GoUtils) set(LDFLAGS "$<$:-s> $<$:-w>") -add_go_lib("${REPOSITORY_ROOT}/go/adbc/pkg/flightsql/" +add_go_lib("${REPOSITORY_ROOT}/go/flightsql/pkg" adbc_driver_flightsql SOURCES driver.go diff --git a/c/driver/flightsql/meson.build b/c/driver/flightsql/meson.build index ce9e0f3839..111ac9500f 100644 --- a/c/driver/flightsql/meson.build +++ b/c/driver/flightsql/meson.build @@ -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', diff --git a/ci/scripts/go_build.ps1 b/ci/scripts/go_build.ps1 index 6d0124d7bc..af51ad2607 100644 --- a/ci/scripts/go_build.ps1 +++ b/ci/scripts/go_build.ps1 @@ -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 diff --git a/ci/scripts/go_test.ps1 b/ci/scripts/go_test.ps1 index 6183e4e7a7..8fb9b0a681 100644 --- a/ci/scripts/go_test.ps1 +++ b/ci/scripts/go_test.ps1 @@ -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 diff --git a/compose.yaml b/compose.yaml index dcfd78f594..882e0b4075 100644 --- a/compose.yaml +++ b/compose.yaml @@ -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: @@ -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 diff --git a/dev/release/rat_exclude_files.txt b/dev/release/rat_exclude_files.txt index c8b4021094..273b8e1fcb 100644 --- a/dev/release/rat_exclude_files.txt +++ b/dev/release/rat_exclude_files.txt @@ -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 diff --git a/docs/source/driver/flight_sql.rst b/docs/source/driver/flight_sql.rst index 31de1e3c28..d738385f1c 100644 --- a/docs/source/driver/flight_sql.rst +++ b/docs/source/driver/flight_sql.rst @@ -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 ---------- diff --git a/docs/source/driver/index.rst b/docs/source/driver/index.rst index 360019562b..8ae41fcaa6 100644 --- a/docs/source/driver/index.rst +++ b/docs/source/driver/index.rst @@ -82,7 +82,7 @@ driver in the table below is packaged this way. * - :doc:`Apache Arrow 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 `__ - ``mssql`` - Foundry diff --git a/go/adbc/driver/internal/driverbase/connection.go b/go/adbc/driver/driverbase/connection.go similarity index 99% rename from go/adbc/driver/internal/driverbase/connection.go rename to go/adbc/driver/driverbase/connection.go index 05f968fde8..4075703b84 100644 --- a/go/adbc/driver/internal/driverbase/connection.go +++ b/go/adbc/driver/driverbase/connection.go @@ -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" @@ -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() }() diff --git a/go/adbc/driver/internal/driverbase/database.go b/go/adbc/driver/driverbase/database.go similarity index 100% rename from go/adbc/driver/internal/driverbase/database.go rename to go/adbc/driver/driverbase/database.go diff --git a/go/adbc/driver/internal/driverbase/driver.go b/go/adbc/driver/driverbase/driver.go similarity index 100% rename from go/adbc/driver/internal/driverbase/driver.go rename to go/adbc/driver/driverbase/driver.go diff --git a/go/adbc/driver/internal/driverbase/driver_info.go b/go/adbc/driver/driverbase/driver_info.go similarity index 100% rename from go/adbc/driver/internal/driverbase/driver_info.go rename to go/adbc/driver/driverbase/driver_info.go diff --git a/go/adbc/driver/internal/driverbase/driver_info_test.go b/go/adbc/driver/driverbase/driver_info_test.go similarity index 97% rename from go/adbc/driver/internal/driverbase/driver_info_test.go rename to go/adbc/driver/driverbase/driver_info_test.go index b253c1b7a3..9af17a49f4 100644 --- a/go/adbc/driver/internal/driverbase/driver_info_test.go +++ b/go/adbc/driver/driverbase/driver_info_test.go @@ -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" ) diff --git a/go/adbc/driver/internal/driverbase/driver_test.go b/go/adbc/driver/driverbase/driver_test.go similarity index 99% rename from go/adbc/driver/internal/driverbase/driver_test.go rename to go/adbc/driver/driverbase/driver_test.go index ab8efb4c80..c9afd41e45 100644 --- a/go/adbc/driver/internal/driverbase/driver_test.go +++ b/go/adbc/driver/driverbase/driver_test.go @@ -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" diff --git a/go/adbc/driver/internal/driverbase/error.go b/go/adbc/driver/driverbase/error.go similarity index 100% rename from go/adbc/driver/internal/driverbase/error.go rename to go/adbc/driver/driverbase/error.go diff --git a/go/adbc/driver/internal/driverbase/logging.go b/go/adbc/driver/driverbase/logging.go similarity index 100% rename from go/adbc/driver/internal/driverbase/logging.go rename to go/adbc/driver/driverbase/logging.go diff --git a/go/adbc/driver/internal/driverbase/rotating_file_writer.go b/go/adbc/driver/driverbase/rotating_file_writer.go similarity index 100% rename from go/adbc/driver/internal/driverbase/rotating_file_writer.go rename to go/adbc/driver/driverbase/rotating_file_writer.go diff --git a/go/adbc/driver/internal/driverbase/rotating_file_writer_test.go b/go/adbc/driver/driverbase/rotating_file_writer_test.go similarity index 98% rename from go/adbc/driver/internal/driverbase/rotating_file_writer_test.go rename to go/adbc/driver/driverbase/rotating_file_writer_test.go index 70a0547bbb..ad5e9cd30b 100644 --- a/go/adbc/driver/internal/driverbase/rotating_file_writer_test.go +++ b/go/adbc/driver/driverbase/rotating_file_writer_test.go @@ -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" ) diff --git a/go/adbc/driver/driverbase/shared_utils.go b/go/adbc/driver/driverbase/shared_utils.go new file mode 100644 index 0000000000..fb7303e733 --- /dev/null +++ b/go/adbc/driver/driverbase/shared_utils.go @@ -0,0 +1,282 @@ +// 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 driverbase + +import ( + "context" + "regexp" + "time" + + "github.com/apache/arrow-adbc/go/adbc" + "github.com/apache/arrow-go/v18/arrow" + "go.opentelemetry.io/otel/attribute" + "go.opentelemetry.io/otel/codes" + semconv "go.opentelemetry.io/otel/semconv/v1.30.0" + "go.opentelemetry.io/otel/trace" +) + +const ( + Unique = "UNIQUE" + PrimaryKey = "PRIMARY KEY" + ForeignKey = "FOREIGN KEY" +) + +var ( + AcceptAll = regexp.MustCompile(".*") +) + +const ( + COLUMN_NAME = "COLUMN_NAME" + ORDINAL_POSITION = "ORDINAL_POSITION" + REMARKS = "REMARKS" + XDBC_DATA_TYPE = "XDBC_DATA_TYPE" + XDBC_TYPE_NAME = "XDBC_TYPE_NAME" + XDBC_COLUMN_SIZE = "XDBC_COLUMN_SIZE" + XDBC_DECIMAL_DIGITS = "XDBC_DECIMAL_DIGITS" + XDBC_NUM_PREC_RADIX = "XDBC_NUM_PREC_RADIX" + XDBC_NULLABLE = "XDBC_NULLABLE" + XDBC_COLUMN_DEF = "XDBC_COLUMN_DEF" + XDBC_SQL_DATA_TYPE = "XDBC_SQL_DATA_TYPE" + XDBC_DATETIME_SUB = "XDBC_DATETIME_SUB" + XDBC_CHAR_OCTET_LENGTH = "XDBC_CHAR_OCTET_LENGTH" + XDBC_IS_NULLABLE = "XDBC_IS_NULLABLE" + XDBC_SCOPE_CATALOG = "XDBC_SCOPE_CATALOG" + XDBC_SCOPE_SCHEMA = "XDBC_SCOPE_SCHEMA" + XDBC_SCOPE_TABLE = "XDBC_SCOPE_TABLE" + XDBC_IS_AUTOINCREMENT = "XDBC_IS_AUTOINCREMENT" + XDBC_IS_AUTOGENERATEDCOLUMN = "XDBC_IS_AUTOGENERATEDCOLUMN" +) + +// The JDBC/ODBC-defined type of any object. +// All the values here are the sames as in the JDBC and ODBC specs. +type XdbcDataType int32 + +const ( + XdbcDataType_XDBC_UNKNOWN_TYPE XdbcDataType = 0 + XdbcDataType_XDBC_CHAR XdbcDataType = 1 + XdbcDataType_XDBC_NUMERIC XdbcDataType = 2 + XdbcDataType_XDBC_DECIMAL XdbcDataType = 3 + XdbcDataType_XDBC_INTEGER XdbcDataType = 4 + XdbcDataType_XDBC_SMALLINT XdbcDataType = 5 + XdbcDataType_XDBC_FLOAT XdbcDataType = 6 + XdbcDataType_XDBC_REAL XdbcDataType = 7 + XdbcDataType_XDBC_DOUBLE XdbcDataType = 8 + XdbcDataType_XDBC_DATETIME XdbcDataType = 9 + XdbcDataType_XDBC_INTERVAL XdbcDataType = 10 + XdbcDataType_XDBC_VARCHAR XdbcDataType = 12 + XdbcDataType_XDBC_DATE XdbcDataType = 91 + XdbcDataType_XDBC_TIME XdbcDataType = 92 + XdbcDataType_XDBC_TIMESTAMP XdbcDataType = 93 + XdbcDataType_XDBC_LONGVARCHAR XdbcDataType = -1 + XdbcDataType_XDBC_BINARY XdbcDataType = -2 + XdbcDataType_XDBC_VARBINARY XdbcDataType = -3 + XdbcDataType_XDBC_LONGVARBINARY XdbcDataType = -4 + XdbcDataType_XDBC_BIGINT XdbcDataType = -5 + XdbcDataType_XDBC_TINYINT XdbcDataType = -6 + XdbcDataType_XDBC_BIT XdbcDataType = -7 + XdbcDataType_XDBC_WCHAR XdbcDataType = -8 + XdbcDataType_XDBC_WVARCHAR XdbcDataType = -9 +) + +func ToXdbcDataType(dt arrow.DataType) (xdbcType XdbcDataType) { + if dt == nil { + return XdbcDataType_XDBC_UNKNOWN_TYPE + } + + switch dt.ID() { + case arrow.EXTENSION: + return ToXdbcDataType(dt.(arrow.ExtensionType).StorageType()) + case arrow.DICTIONARY: + return ToXdbcDataType(dt.(*arrow.DictionaryType).ValueType) + case arrow.RUN_END_ENCODED: + return ToXdbcDataType(dt.(*arrow.RunEndEncodedType).Encoded()) + case arrow.INT8, arrow.UINT8: + return XdbcDataType_XDBC_TINYINT + case arrow.INT16, arrow.UINT16: + return XdbcDataType_XDBC_SMALLINT + case arrow.INT32, arrow.UINT32: + return XdbcDataType_XDBC_INTEGER + case arrow.INT64, arrow.UINT64: + return XdbcDataType_XDBC_BIGINT + case arrow.FLOAT32, arrow.FLOAT16, arrow.FLOAT64: + return XdbcDataType_XDBC_FLOAT + case arrow.DECIMAL, arrow.DECIMAL256: + return XdbcDataType_XDBC_DECIMAL + case arrow.STRING, arrow.LARGE_STRING: + return XdbcDataType_XDBC_VARCHAR + case arrow.BINARY, arrow.LARGE_BINARY: + return XdbcDataType_XDBC_BINARY + case arrow.FIXED_SIZE_BINARY: + return XdbcDataType_XDBC_BINARY + case arrow.BOOL: + return XdbcDataType_XDBC_BIT + case arrow.TIME32, arrow.TIME64: + return XdbcDataType_XDBC_TIME + case arrow.DATE32, arrow.DATE64: + return XdbcDataType_XDBC_DATE + case arrow.TIMESTAMP: + return XdbcDataType_XDBC_TIMESTAMP + case arrow.DENSE_UNION, arrow.SPARSE_UNION: + return XdbcDataType_XDBC_VARBINARY + case arrow.LIST, arrow.LARGE_LIST, arrow.FIXED_SIZE_LIST: + return XdbcDataType_XDBC_VARBINARY + case arrow.STRUCT, arrow.MAP: + return XdbcDataType_XDBC_VARBINARY + default: + return XdbcDataType_XDBC_UNKNOWN_TYPE + } +} + +// Starts a trace.Span with the given spanName for the tracing object with +// the given ctx context. +func StartSpan(ctx context.Context, spanName string, tracing adbc.OTelTracing, opts ...trace.SpanStartOption) (context.Context, trace.Span) { + if tracing == nil { + return ctx, trace.SpanFromContext(ctx) + } + + attrs := tracing.GetInitialSpanAttributes() + attrs = append(attrs, semconv.DBOperationName(spanName)) + opts = append(opts, trace.WithAttributes(attrs...)) + + return tracing.StartSpan(ctx, spanName, opts...) +} + +// Starts a trace.Span with the given spanName for the tracing object with +// the given ctx context. Returns an EndSpanHelper to centralize span completion for operations that may fail. +func StartSpanWithEndSpanHelper(ctx context.Context, spanName string, tracing adbc.OTelTracing, opts ...trace.SpanStartOption) (context.Context, trace.Span, *EndSpanHelper) { + startTime := time.Now() + if tracing == nil { + span := trace.SpanFromContext(ctx) + return ctx, span, NewEndSpanHelper(span).WithStartTime(startTime) + } + + attrs := tracing.GetInitialSpanAttributes() + attrs = append(attrs, semconv.DBOperationName(spanName)) + opts = append(opts, trace.WithAttributes(attrs...)) + + newCtx, span := tracing.StartSpan(ctx, spanName, opts...) + return newCtx, span, NewEndSpanHelper(span).WithStartTime(startTime) +} + +// Ends the given span. If err is not nil, then the +// error is recorded and the status is set appropriately. +// Otherwise, the status is set to Ok. +func EndSpan(span trace.Span, err error, options ...trace.SpanEndOption) { + if err != nil { + span.RecordError(err) + if adbcError, ok := err.(adbc.Error); ok { + span.SetAttributes(semconv.ErrorTypeKey.String(adbcError.Code.String())) + } + span.SetStatus(codes.Error, err.Error()) + } else { + span.SetStatus(codes.Ok, "") + } + span.End(options...) +} + +// Ends the given span. If err is not nil, then the +// error is recorded and the status is set appropriately. +// Otherwise, the status is set to Ok. +func EndSpanWithError(span trace.Span, err *error, options ...trace.SpanEndOption) { + if err != nil && *err != nil { + span.RecordError(*err) + setSpanStatus(span, *err) + } else { + setSpanStatus(span, nil) + } + span.End(options...) +} + +// EndSpanHelper centralizes span completion for operations that may fail. +// It records errors when present, records the elapsed duration if a start time +// was provided, and ensures the span status and end options are applied uniformly. +type EndSpanHelper struct { + span trace.Span + err *error + errorRecorded bool + startTime *time.Time + options []trace.SpanEndOption +} + +// NewEndSpanHelper creates a helper for finalizing a span after an operation. +func NewEndSpanHelper(span trace.Span) *EndSpanHelper { + return &EndSpanHelper{ + span: span, + errorRecorded: false, + startTime: nil, + err: nil, + } +} + +// WithError configures the error to be recorded and reported on the span. +// It returns the helper itself to allow fluent chaining. +func (h *EndSpanHelper) WithError(err error) *EndSpanHelper { + h.err = &err + return h +} + +// WithRecordedError marks whether an error has already been recorded elsewhere. +// It returns the helper itself to allow fluent chaining. +func (h *EndSpanHelper) WithRecordedError(errorRecorded bool) *EndSpanHelper { + h.errorRecorded = errorRecorded + return h +} + +// WithOptions sets the span end options to apply when the span is closed. +// It returns the helper itself to allow fluent chaining. +func (h *EndSpanHelper) WithOptions(options ...trace.SpanEndOption) *EndSpanHelper { + h.options = options + return h +} + +// WithStartTime sets the operation start time so the elapsed duration can be recorded. +// It returns the helper itself to allow fluent chaining. +func (h *EndSpanHelper) WithStartTime(startTime time.Time) *EndSpanHelper { + h.startTime = &startTime + return h +} + +// EndSpan completes the span, records any error, sets status, and emits duration metadata if available. +func (h *EndSpanHelper) EndSpan() { + if h.span == nil { + return + } + if h.startTime != nil { + h.span.SetAttributes(attribute.Float64("span.duration_s", time.Since(*h.startTime).Seconds())) + } + if !h.errorRecorded && h.err != nil && *h.err != nil { + h.span.RecordError(*h.err) + } + if h.err != nil && *h.err != nil { + setSpanStatus(h.span, *h.err) + } else { + setSpanStatus(h.span, nil) + } + h.span.End(h.options...) +} + +func setSpanStatus(span trace.Span, err error) { + if err != nil { + if adbcError, ok := err.(adbc.Error); ok { + span.SetAttributes(semconv.ErrorTypeKey.String(adbcError.Code.String())) + } + span.SetStatus(codes.Error, err.Error()) + } else { + span.SetStatus(codes.Ok, "") + } +} diff --git a/go/adbc/driver/internal/driverbase/statement.go b/go/adbc/driver/driverbase/statement.go similarity index 100% rename from go/adbc/driver/internal/driverbase/statement.go rename to go/adbc/driver/driverbase/statement.go diff --git a/go/adbc/go.mod b/go/adbc/go.mod index a431ad4f72..95cc325009 100644 --- a/go/adbc/go.mod +++ b/go/adbc/go.mod @@ -24,43 +24,30 @@ toolchain go1.26.8 require ( github.com/apache/arrow-go/v18 v18.7.0 - github.com/bluele/gcache v0.0.2 - github.com/golang/protobuf v1.5.4 - github.com/google/uuid v1.6.0 github.com/stretchr/testify v1.12.1 - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.70.0 go.opentelemetry.io/otel v1.46.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.46.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.46.0 go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.46.0 go.opentelemetry.io/otel/sdk v1.46.0 go.opentelemetry.io/otel/trace v1.46.0 - golang.org/x/exp v0.0.0-20260112195511-716be5621a96 - golang.org/x/oauth2 v0.36.0 golang.org/x/sync v0.22.0 golang.org/x/tools v0.49.0 - google.golang.org/grpc v1.83.2 google.golang.org/protobuf v1.36.12 - modernc.org/sqlite v1.57.0 ) require ( - cloud.google.com/go/compute/metadata v0.9.0 // indirect github.com/cenkalti/backoff/v5 v5.0.3 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/dustin/go-humanize v1.0.1 // indirect github.com/go-logr/logr v1.4.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/goccy/go-json v0.10.6 // indirect github.com/google/flatbuffers v25.12.19+incompatible // indirect + github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 // indirect github.com/klauspost/compress v1.19.0 // indirect github.com/klauspost/cpuid/v2 v2.4.0 // indirect - github.com/mattn/go-isatty v0.0.24 // indirect - github.com/ncruces/go-strftime v1.0.0 // indirect github.com/pierrec/lz4/v4 v4.1.27 // indirect - github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect - github.com/stoewer/go-strcase v1.3.1 // indirect github.com/stretchr/objx v0.5.3 // indirect github.com/zeebo/xxh3 v1.1.0 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect @@ -68,13 +55,12 @@ require ( go.opentelemetry.io/otel/metric v1.46.0 // indirect go.opentelemetry.io/proto/otlp v1.11.0 // indirect go.yaml.in/yaml/v3 v3.0.5 // indirect + golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect golang.org/x/mod v0.39.0 // indirect golang.org/x/net v0.58.0 // indirect golang.org/x/sys v0.47.0 // indirect golang.org/x/text v0.41.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20260819154853-08b0e4226688 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20260819154853-08b0e4226688 // indirect - modernc.org/libc v1.74.4 // indirect - modernc.org/mathutil v1.7.1 // indirect - modernc.org/memory v1.11.0 // indirect + google.golang.org/grpc v1.83.1 // indirect ) diff --git a/go/adbc/go.sum b/go/adbc/go.sum index 9067c0f325..31797c91d0 100644 --- a/go/adbc/go.sum +++ b/go/adbc/go.sum @@ -1,21 +1,13 @@ -cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs= -cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10= github.com/andybalholm/brotli v1.2.2 h1:HzTuoo2ErYQqf5qvcJInB8uvqSVxRttzkFexPWtnceM= github.com/andybalholm/brotli v1.2.2/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY= github.com/apache/arrow-go/v18 v18.7.0 h1:Vw/i+cJyebUofT7JlqFpe65LrmwxULn166jjwStM4HY= github.com/apache/arrow-go/v18 v18.7.0/go.mod h1:PM6IigLJkdMwIpeHXnymo+xZ52f42a9EYiLtRel4p/A= github.com/apache/thrift v0.24.0 h1:zy31L1a49QTNB2bG1BBfMXol3yJrTH975G3pPubQVLQ= github.com/apache/thrift v0.24.0/go.mod h1:zPt6WxgvTOM6hF92y8C+MkEM5LMxZuk4JcQOiU4Esvs= -github.com/bluele/gcache v0.0.2 h1:WcbfdXICg7G/DGBh1PFfcirkWOQV+v077yF1pSy3DGw= -github.com/bluele/gcache v0.0.2/go.mod h1:m15KV+ECjptwSPxKhOhQoAFQVtUFjTVkc3H8o0t/fp0= github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= -github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= @@ -29,37 +21,18 @@ github.com/google/flatbuffers v25.12.19+incompatible h1:haMV2JRRJCe1998HeW/p0X9U github.com/google/flatbuffers v25.12.19+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= -github.com/google/pprof v0.0.0-20260802141513-ef3492d7dac3 h1:LMLX+LgTNWpfvCBdFebv6EsYotImrt/Ppc5cXIriCSo= -github.com/google/pprof v0.0.0-20260802141513-ef3492d7dac3/go.mod h1:jl5iWTm0/hd5PjEYEOuwAJ57L/CibdZfrqZ5XA5GrCk= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 h1:/Tnpcb2E0Pz/tN9s3bfEY2Q8ePCEX9iuS+cneUwncnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0/go.mod h1:zOBXOsUaBSjKgmH4OGzV1esUpR3oUSCPYVd2cUBjKYY= -github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= -github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/klauspost/compress v1.19.0 h1:sXLILfc9jV2QYWkzFOPWStmcUVH2RHEB1JCdY2oVvCQ= github.com/klauspost/compress v1.19.0/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ= github.com/klauspost/cpuid/v2 v2.4.0 h1:S6Hrbc7+ywsr0r+RLapfGBHfyefhCTwEh3A0tV913Dw= github.com/klauspost/cpuid/v2 v2.4.0/go.mod h1:19jmZ9mjzoF//ddRSUsv0zfBTJWh3QJh9FNxZTMrGxU= -github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI= -github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A= -github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w= -github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= github.com/pierrec/lz4/v4 v4.1.27 h1:+PhzhWDrjRj89TH2sw43nE3+4+W8lSxIuQadEHZyjUk= github.com/pierrec/lz4/v4 v4.1.27/go.mod h1:EoQMVJgeeEOMsCqCzqFm2O0cJvljX2nGZjcRIPL34O4= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= -github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= -github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= @@ -68,8 +41,6 @@ github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs= github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.70.0 h1:oECp5f+hN7nkwjU/8BxQ/q23bGPb8FIrD839owX222E= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.70.0/go.mod h1:DqEFwLumhzMBDQv9PcWbyoDxHI/4lAk6CM4nJBH39sc= go.opentelemetry.io/otel v1.46.0 h1:FHt5/CDyVxi/8IM1CH7VE/rRgq3kLHa2mSTVMO8AWyc= go.opentelemetry.io/otel v1.46.0/go.mod h1:Gj3SEScelsNC45tp4nSxRYlS+f5iez7W8XPMCt905kE= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.46.0 h1:OFnwLJr+pF3iHrlGSzbxyuo6/6HyBlnlN1CWEJmBVcw= @@ -100,8 +71,6 @@ golang.org/x/mod v0.39.0 h1:UF5zwQdCRRUpHfyPwr7d4UrGiVeldIsogtzWVnczL74= golang.org/x/mod v0.39.0/go.mod h1:bvIbwjQ0HUFFf5AKukeeYQG4ZBUG9yxQbR9aEweIwYY= golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= golang.org/x/net v0.58.0/go.mod h1:YwCddHnFlT7eLQqVprV19OnhLGtc5xOKgE0RyqgfWAU= -golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= -golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs= @@ -116,38 +85,7 @@ google.golang.org/genproto/googleapis/api v0.0.0-20260819154853-08b0e4226688 h1: google.golang.org/genproto/googleapis/api v0.0.0-20260819154853-08b0e4226688/go.mod h1:1RJ9BQGyNdZwkGc1eTqkErfRZ6RJyYPHZo73BZ1vQqI= google.golang.org/genproto/googleapis/rpc v0.0.0-20260819154853-08b0e4226688 h1:cYNAzI2sUwhmCcoj9TxvihSrqsxt6uIkj3rDRhSDmW4= google.golang.org/genproto/googleapis/rpc v0.0.0-20260819154853-08b0e4226688/go.mod h1:DjtHYE8FKJLivXcBEjGwndXfIC23G0VpXiXKqG179uA= -google.golang.org/grpc v1.83.2 h1:EManeRomTObA0BU7I8vXgg/78uE5MJ9M8B39EX2WscU= -google.golang.org/grpc v1.83.2/go.mod h1:YPI1hK3kDked6iHvgX3tR0y+nX/qpMFKhPgFsokw1S8= +google.golang.org/grpc v1.83.1 h1:HIO0+BEtBP6soyqvqC8sNUjZ7bTs+0hFQuFF+RAy++Y= +google.golang.org/grpc v1.83.1/go.mod h1:kDyl6SKsiHKt0uylY5gtn5cEjkrIOhQOGDgIc4JGwzQ= google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= -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= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -modernc.org/cc/v4 v4.29.1 h1:MKgdCV3WykTSPqpVrnxdEDS0HEd2FHpKZDzxzU5LyeI= -modernc.org/cc/v4 v4.29.1/go.mod h1:OnovgIhbbMXMu1aISnJ0wvVD1KnW+cAUJkIrAWh+kVI= -modernc.org/ccgo/v4 v4.34.6 h1:sBgfIwyN0TQ9C5hwIeuqyeAKyMWnbvj2fvpF4L11uzU= -modernc.org/ccgo/v4 v4.34.6/go.mod h1:SZ8YcN9NG7XVsQYdm6jYBvi8PQP1qi+kqB6OhjqI3Fk= -modernc.org/fileutil v1.4.0 h1:j6ZzNTftVS054gi281TyLjHPp6CPHr2KCxEXjEbD6SM= -modernc.org/fileutil v1.4.0/go.mod h1:EqdKFDxiByqxLk8ozOxObDSfcVOv/54xDs/DUHdvCUU= -modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI= -modernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito= -modernc.org/gc/v3 v3.1.4 h1:2g65LGVSmFQrXeITAw97x7hCRvZFcyE1uDP+7Vng7JI= -modernc.org/gc/v3 v3.1.4/go.mod h1:HFK/6AGESC7Ex+EZJhJ2Gni6cTaYpSMmU/cT9RmlfYY= -modernc.org/goabi0 v0.2.0 h1:HvEowk7LxcPd0eq6mVOAEMai46V+i7Jrj13t4AzuNks= -modernc.org/goabi0 v0.2.0/go.mod h1:CEFRnnJhKvWT1c1JTI3Avm+tgOWbkOu5oPA8eH8LnMI= -modernc.org/libc v1.74.4 h1:fX1Omw4o2/1C2iRkkIsrQTasJQldLhRmuPreXLoWs9k= -modernc.org/libc v1.74.4/go.mod h1:eeQAS9W3sZeKYMFubydxJpII9ybHWshk+7or7bLG9co= -modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU= -modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= -modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI= -modernc.org/memory v1.11.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw= -modernc.org/opt v0.2.0 h1:tGyef5ApycA7FSEOMraay9SaTk5zmbx7Tu+cJs4QKZg= -modernc.org/opt v0.2.0/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns= -modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w= -modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE= -modernc.org/sqlite v1.57.0 h1:qNQP6xnx5M0ISNtlnxoOX0+cD5bJ0/gr9aMmndFczzg= -modernc.org/sqlite v1.57.0/go.mod h1:yCJ2cmAaIkHQ25oXWrF8H4O1lIfPYPR26yCEDj2P3pQ= -modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0= -modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A= -modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= -modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= diff --git a/go/adbc/pkg/Makefile b/go/adbc/pkg/Makefile index fc31007aa7..65e4c6e255 100644 --- a/go/adbc/pkg/Makefile +++ b/go/adbc/pkg/Makefile @@ -47,8 +47,12 @@ DRIVERS := $(addsuffix .$(SUFFIX),$(addprefix libadbc_driver_,$(MANAGERS))) .PHONY: all regenerate all: $(DRIVERS) +libadbc_driver_%.$(SUFFIX): ../../% ../../%/pkg ../../%/go.mod ../../%/go.sum + $(GO_BUILD) -C ../../$* -buildvcs=true -tags driverlib -o $(CURDIR)/$@ -buildmode=c-shared -ldflags "-X github.com/apache/arrow-adbc/go/adbc/driver/driverbase.infoDriverVersion=$(VERSION)" ./pkg + $(RM) $(basename $@).h + libadbc_driver_%.$(SUFFIX): % ../driver/% ../go.mod ../go.sum - $(GO_BUILD) -buildvcs=true -tags driverlib -o $@ -buildmode=c-shared -ldflags "-X github.com/apache/arrow-adbc/go/adbc/driver/internal/driverbase.infoDriverVersion=$(VERSION)" ./$* + $(GO_BUILD) -buildvcs=true -tags driverlib -o $@ -buildmode=c-shared -ldflags "-X github.com/apache/arrow-adbc/go/adbc/driver/driverbase.infoDriverVersion=$(VERSION)" ./$* $(RM) $(basename $@).h regenerate: diff --git a/go/adbc/driver/flightsql/cmd/oauthserver/main.go b/go/flightsql/cmd/oauthserver/main.go similarity index 100% rename from go/adbc/driver/flightsql/cmd/oauthserver/main.go rename to go/flightsql/cmd/oauthserver/main.go diff --git a/go/adbc/driver/flightsql/cmd/testserver/main.go b/go/flightsql/cmd/testserver/main.go similarity index 100% rename from go/adbc/driver/flightsql/cmd/testserver/main.go rename to go/flightsql/cmd/testserver/main.go diff --git a/go/adbc/driver/flightsql/example_usage_test.go b/go/flightsql/example_usage_test.go similarity index 98% rename from go/adbc/driver/flightsql/example_usage_test.go rename to go/flightsql/example_usage_test.go index 446dc42b99..a59dac90b1 100644 --- a/go/adbc/driver/flightsql/example_usage_test.go +++ b/go/flightsql/example_usage_test.go @@ -29,7 +29,7 @@ import ( "log" "github.com/apache/arrow-adbc/go/adbc" - drv "github.com/apache/arrow-adbc/go/adbc/driver/flightsql" + drv "github.com/apache/arrow-adbc/go/flightsql" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/flight" "github.com/apache/arrow-go/v18/arrow/flight/flightsql" diff --git a/go/adbc/driver/flightsql/flightsql_adbc_server_test.go b/go/flightsql/flightsql_adbc_server_test.go similarity index 99% rename from go/adbc/driver/flightsql/flightsql_adbc_server_test.go rename to go/flightsql/flightsql_adbc_server_test.go index 276b7259c7..03e3f37e63 100644 --- a/go/adbc/driver/flightsql/flightsql_adbc_server_test.go +++ b/go/flightsql/flightsql_adbc_server_test.go @@ -47,9 +47,9 @@ import ( "github.com/google/uuid" "github.com/apache/arrow-adbc/go/adbc" - driver "github.com/apache/arrow-adbc/go/adbc/driver/flightsql" - "github.com/apache/arrow-adbc/go/adbc/driver/internal" + "github.com/apache/arrow-adbc/go/adbc/driver/driverbase" "github.com/apache/arrow-adbc/go/adbc/validation" + driver "github.com/apache/arrow-adbc/go/flightsql" "github.com/apache/arrow-go/v18/arrow" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/flight" @@ -2523,9 +2523,9 @@ func (suite *GetObjectsTests) TestMetadataGetObjectsColumnsXdbc() { //[]string{"1", "2", "3"}, //ordinalPosition []string{"currencycol_", "floatcols_", "intcols_"}, //remarks []string{ //xdbcDataType - "currencycol_" + strconv.Itoa(int(internal.ToXdbcDataType(arrow.PrimitiveTypes.Float64))), - "floatcols_" + strconv.Itoa(int(internal.ToXdbcDataType(arrow.PrimitiveTypes.Float32))), - "intcols_" + strconv.Itoa(int(internal.ToXdbcDataType(arrow.PrimitiveTypes.Int32))), + "currencycol_" + strconv.Itoa(int(driverbase.ToXdbcDataType(arrow.PrimitiveTypes.Float64))), + "floatcols_" + strconv.Itoa(int(driverbase.ToXdbcDataType(arrow.PrimitiveTypes.Float32))), + "intcols_" + strconv.Itoa(int(driverbase.ToXdbcDataType(arrow.PrimitiveTypes.Int32))), }, []string{ //xdbcTypeName "currencycol_CURRENCY", @@ -2538,9 +2538,9 @@ func (suite *GetObjectsTests) TestMetadataGetObjectsColumnsXdbc() { []string{"currencycol_0", "floatcols_0", "intcols_0"}, //xdbcNullable []string{"currencycol_", "floatcols_", "intcols_"}, //xdbcColumnDef []string{ //xdbcSqlDataType - "currencycol_" + strconv.Itoa(int(internal.ToXdbcDataType(arrow.PrimitiveTypes.Float64))), - "floatcols_" + strconv.Itoa(int(internal.ToXdbcDataType(arrow.PrimitiveTypes.Float32))), - "intcols_" + strconv.Itoa(int(internal.ToXdbcDataType(arrow.PrimitiveTypes.Int32))), + "currencycol_" + strconv.Itoa(int(driverbase.ToXdbcDataType(arrow.PrimitiveTypes.Float64))), + "floatcols_" + strconv.Itoa(int(driverbase.ToXdbcDataType(arrow.PrimitiveTypes.Float32))), + "intcols_" + strconv.Itoa(int(driverbase.ToXdbcDataType(arrow.PrimitiveTypes.Int32))), }, []string{"currencycol_0", "floatcols_0", "intcols_0"}, //xdbcDatetimeSub []string{"currencycol_0", "floatcols_0", "intcols_0"}, //xdbcCharOctetLength diff --git a/go/adbc/driver/flightsql/flightsql_adbc_test.go b/go/flightsql/flightsql_adbc_test.go similarity index 99% rename from go/adbc/driver/flightsql/flightsql_adbc_test.go rename to go/flightsql/flightsql_adbc_test.go index 66019995f7..4d4f364d7c 100644 --- a/go/adbc/driver/flightsql/flightsql_adbc_test.go +++ b/go/flightsql/flightsql_adbc_test.go @@ -44,8 +44,8 @@ import ( "time" "github.com/apache/arrow-adbc/go/adbc" - driver "github.com/apache/arrow-adbc/go/adbc/driver/flightsql" "github.com/apache/arrow-adbc/go/adbc/validation" + driver "github.com/apache/arrow-adbc/go/flightsql" "github.com/apache/arrow-go/v18/arrow" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/flight" diff --git a/go/adbc/driver/flightsql/flightsql_bulk_ingest.go b/go/flightsql/flightsql_bulk_ingest.go similarity index 97% rename from go/adbc/driver/flightsql/flightsql_bulk_ingest.go rename to go/flightsql/flightsql_bulk_ingest.go index b5e4dc185b..15f01c2757 100644 --- a/go/adbc/driver/flightsql/flightsql_bulk_ingest.go +++ b/go/flightsql/flightsql_bulk_ingest.go @@ -23,7 +23,7 @@ import ( "time" "github.com/apache/arrow-adbc/go/adbc" - "github.com/apache/arrow-adbc/go/adbc/driver/internal" + "github.com/apache/arrow-adbc/go/adbc/driver/driverbase" "github.com/apache/arrow-go/v18/arrow" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/flight/flightsql" @@ -109,7 +109,7 @@ func createRecordReaderFromBatch(batch arrow.RecordBatch) (array.RecordReader, e // This is called from the statement when a target table has been set for bulk ingest. func (s *statement) executeIngest(ctx context.Context) (nRows int64, err error) { var startTime = time.Now() - ctx, span, endSpanHelper := internal.StartSpanWithEndSpanHelper(ctx, "FlightSQL.BulkIngest.Execute", s.cnxn) + ctx, span, endSpanHelper := driverbase.StartSpanWithEndSpanHelper(ctx, "FlightSQL.BulkIngest.Execute", s.cnxn) errorRecorded := false defer func() { endSpanHelper.WithError(err).WithRecordedError(errorRecorded).EndSpan() diff --git a/go/adbc/driver/flightsql/flightsql_connection.go b/go/flightsql/flightsql_connection.go similarity index 97% rename from go/adbc/driver/flightsql/flightsql_connection.go rename to go/flightsql/flightsql_connection.go index 291228d1a8..96f6319975 100644 --- a/go/adbc/driver/flightsql/flightsql_connection.go +++ b/go/flightsql/flightsql_connection.go @@ -28,8 +28,7 @@ import ( "time" "github.com/apache/arrow-adbc/go/adbc" - "github.com/apache/arrow-adbc/go/adbc/driver/internal" - "github.com/apache/arrow-adbc/go/adbc/driver/internal/driverbase" + "github.com/apache/arrow-adbc/go/adbc/driver/driverbase" "github.com/apache/arrow-go/v18/arrow" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/flight" @@ -69,7 +68,7 @@ type connectionImpl struct { } type flightSqlMetadata struct { - internal.DefaultXdbcMetadataBuilder + DefaultXdbcMetadataBuilder columnMetadata *flightsql.ColumnMetadata } @@ -102,7 +101,7 @@ func (md *flightSqlMetadata) SetXdbcScopeTable(b *array.StringBuilder) { } func (md *flightSqlMetadata) SetXdbcSqlDataType(columnType arrow.DataType, b *array.Int16Builder) { - b.Append(int16(internal.ToXdbcDataType(columnType))) + b.Append(int16(driverbase.ToXdbcDataType(columnType))) } func (md *flightSqlMetadata) SetXdbcTypeName(b *array.StringBuilder) { @@ -123,7 +122,7 @@ func (md *flightSqlMetadata) SetXdbcIsAutoincrement(builder *array.BooleanBuilde func (c *connectionImpl) GetObjects(ctx context.Context, depth adbc.ObjectDepth, catalog *string, dbSchema *string, tableName *string, columnName *string, tableType []string) (array.RecordReader, error) { // To avoid an N+1 query problem, we assume result sets here will fit in memory and build up a single response. - g := internal.GetObjects{Ctx: ctx, Depth: depth, Catalog: catalog, DbSchema: dbSchema, TableName: tableName, ColumnName: columnName, TableType: tableType} + g := GetObjects{Ctx: ctx, Depth: depth, Catalog: catalog, DbSchema: dbSchema, TableName: tableName, ColumnName: columnName, TableType: tableType} if err := g.Init(c.Base().Alloc, c.GetObjectsDbSchemas, c.GetObjectsTables, &flightSqlMetadata{}); err != nil { return nil, err } @@ -247,7 +246,7 @@ func doGetWithResponseMetadata(ctx context.Context, client *flightsql.Client, ti func doGetWithTracer(ctx context.Context, cl *flightsql.Client, endpoint *flight.FlightEndpoint, clientCache gcache.Cache, tracing adbc.OTelTracing, opts ...grpc.CallOption) (rdr *flight.Reader, err error) { const spanName = "FlightSQL.Connection.DoGet" - ctx, span, endSpanHelper := internal.StartSpanWithEndSpanHelper(ctx, spanName, tracing) + ctx, span, endSpanHelper := driverbase.StartSpanWithEndSpanHelper(ctx, spanName, tracing) errorRecorded := false defer func() { endSpanHelper.WithError(err).WithRecordedError(errorRecorded).EndSpan() @@ -733,7 +732,7 @@ func (c *connectionImpl) SetOptionDouble(key string, value float64) error { func (c *connectionImpl) PrepareDriverInfo(ctx context.Context, infoCodes []adbc.InfoCode) (err error) { const spanName = "FlightSQL.Connection.PrepareDriverInfo" - ctx, _, endSpanHelper := internal.StartSpanWithEndSpanHelper(ctx, spanName, c) + ctx, _, endSpanHelper := driverbase.StartSpanWithEndSpanHelper(ctx, spanName, c) defer func() { endSpanHelper.WithError(err).EndSpan() }() @@ -858,7 +857,7 @@ func (c *connectionImpl) readInfo(ctx context.Context, expectedSchema *arrow.Sch func (c *connectionImpl) GetObjectsCatalogs(ctx context.Context, catalog *string) (catalogs []string, err error) { const spanName = "FlightSQL.Connection.GetObjectsCatalogs" - ctx, _, endSpanHelper := internal.StartSpanWithEndSpanHelper(ctx, spanName, c) + ctx, _, endSpanHelper := driverbase.StartSpanWithEndSpanHelper(ctx, spanName, c) defer func() { endSpanHelper.WithError(err).EndSpan() }() @@ -906,7 +905,7 @@ func (c *connectionImpl) GetObjectsCatalogs(ctx context.Context, catalog *string // Helper function to build up a map of catalogs to DB schemas func (c *connectionImpl) GetObjectsDbSchemas(ctx context.Context, depth adbc.ObjectDepth, catalog *string, dbSchema *string) (result map[string][]string, err error) { const spanName = "FlightSQL.Connection.GetObjectsDbSchemas" - ctx, _, endSpanHelper := internal.StartSpanWithEndSpanHelper(ctx, spanName, c) + ctx, _, endSpanHelper := driverbase.StartSpanWithEndSpanHelper(ctx, spanName, c) defer func() { endSpanHelper.WithError(err).EndSpan() }() @@ -953,9 +952,9 @@ func (c *connectionImpl) GetObjectsDbSchemas(ctx context.Context, depth adbc.Obj return } -func (c *connectionImpl) GetObjectsTables(ctx context.Context, depth adbc.ObjectDepth, catalog *string, dbSchema *string, tableName *string, columnName *string, tableType []string) (result internal.SchemaToTableInfo, err error) { +func (c *connectionImpl) GetObjectsTables(ctx context.Context, depth adbc.ObjectDepth, catalog *string, dbSchema *string, tableName *string, columnName *string, tableType []string) (result SchemaToTableInfo, err error) { const spanName = "FlightSQL.Connection.GetObjectsTables" - ctx, _, endSpanHelper := internal.StartSpanWithEndSpanHelper(ctx, spanName, c) + ctx, _, endSpanHelper := driverbase.StartSpanWithEndSpanHelper(ctx, spanName, c) defer func() { endSpanHelper.WithError(err).EndSpan() }() @@ -964,7 +963,7 @@ func (c *connectionImpl) GetObjectsTables(ctx context.Context, depth adbc.Object return } ctx = metadata.NewOutgoingContext(ctx, c.hdrs) - result = make(map[internal.CatalogAndSchema][]internal.TableInfo) + result = make(map[CatalogAndSchema][]TableInfo) // Pre-populate the map of which schemas are in which catalogs includeSchema := depth == adbc.ObjectDepthAll || depth == adbc.ObjectDepthColumns @@ -1010,7 +1009,7 @@ func (c *connectionImpl) GetObjectsTables(ctx context.Context, depth adbc.Object if !dbSchema.IsNull(i) { dbSchemaName = string([]byte(dbSchema.Value(i))) } - key := internal.CatalogAndSchema{ + key := CatalogAndSchema{ Catalog: catalogName, Schema: dbSchemaName, } @@ -1029,7 +1028,7 @@ func (c *connectionImpl) GetObjectsTables(ctx context.Context, depth adbc.Object reader.Release() } - result[key] = append(result[key], internal.TableInfo{ + result[key] = append(result[key], TableInfo{ Name: string([]byte(tableName.Value(i))), TableType: string([]byte(tableType.Value(i))), Schema: schema, @@ -1045,7 +1044,7 @@ func (c *connectionImpl) GetObjectsTables(ctx context.Context, depth adbc.Object func (c *connectionImpl) GetTableSchema(ctx context.Context, catalog *string, dbSchema *string, tableName string) (schema *arrow.Schema, err error) { const spanName = "FlightSQL.Connection.GetTableSchema" - ctx, _, endSpanHelper := internal.StartSpanWithEndSpanHelper(ctx, spanName, c) + ctx, _, endSpanHelper := driverbase.StartSpanWithEndSpanHelper(ctx, spanName, c) defer func() { endSpanHelper.WithError(err).EndSpan() }() @@ -1132,7 +1131,7 @@ func (c *connectionImpl) GetTableSchema(ctx context.Context, catalog *string, db // table_type | utf8 not null func (c *connectionImpl) GetTableTypes(ctx context.Context) (reader array.RecordReader, err error) { const spanName = "FlightSQL.Connection.GetTableTypes" - ctx, _, endSpanHelper := internal.StartSpanWithEndSpanHelper(ctx, spanName, c) + ctx, _, endSpanHelper := driverbase.StartSpanWithEndSpanHelper(ctx, spanName, c) defer func() { endSpanHelper.WithError(err).EndSpan() }() @@ -1306,7 +1305,7 @@ func (c *connectionImpl) prepareSubstrait(ctx context.Context, plan flightsql.Su // Close closes this connection and releases any associated resources. func (c *connectionImpl) Close() (err error) { const spanName = "FlightSQL.Connection.Close" - ctx, span, endSpanHelper := internal.StartSpanWithEndSpanHelper(context.Background(), spanName, c) + ctx, span, endSpanHelper := driverbase.StartSpanWithEndSpanHelper(context.Background(), spanName, c) defer func() { endSpanHelper.WithError(err).EndSpan() }() @@ -1362,7 +1361,7 @@ func (c *connectionImpl) Close() (err error) { // A partition can be retrieved by using ExecutePartitions on a statement. func (c *connectionImpl) ReadPartition(ctx context.Context, serializedPartition []byte) (rdr array.RecordReader, err error) { const spanName = "FlightSQL.Connection.ReadPartition" - ctx, _, endSpanHelper := internal.StartSpanWithEndSpanHelper(ctx, spanName, c) + ctx, _, endSpanHelper := driverbase.StartSpanWithEndSpanHelper(ctx, spanName, c) defer func() { endSpanHelper.WithError(err).EndSpan() }() diff --git a/go/adbc/driver/flightsql/flightsql_database.go b/go/flightsql/flightsql_database.go similarity index 97% rename from go/adbc/driver/flightsql/flightsql_database.go rename to go/flightsql/flightsql_database.go index 650fd4c68d..1a8ba65014 100644 --- a/go/adbc/driver/flightsql/flightsql_database.go +++ b/go/flightsql/flightsql_database.go @@ -30,8 +30,7 @@ import ( "time" "github.com/apache/arrow-adbc/go/adbc" - "github.com/apache/arrow-adbc/go/adbc/driver/internal" - "github.com/apache/arrow-adbc/go/adbc/driver/internal/driverbase" + "github.com/apache/arrow-adbc/go/adbc/driver/driverbase" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/flight" "github.com/apache/arrow-go/v18/arrow/flight/flightsql" @@ -373,7 +372,7 @@ func (d *databaseImpl) SetOptionDouble(key string, value float64) error { func (d *databaseImpl) Close() (err error) { const spanName = "FlightSQL.Database.Close" - _, span, endSpanHelper := internal.StartSpanWithEndSpanHelper(context.Background(), spanName, d) + _, span, endSpanHelper := driverbase.StartSpanWithEndSpanHelper(context.Background(), spanName, d) span.AddEvent("closing", trace.WithAttributes(attribute.String("target", d.uri.String()))) flushErr := d.ForceFlushTracing(context.Background()) @@ -523,7 +522,7 @@ type support struct { func closeCachedFlightClient(d *databaseImpl, location, client interface{}, reason string) { var err error - _, _, endSpanHelper := internal.StartSpanWithEndSpanHelper(context.Background(), "FlightSQL.Database.CloseCachedClient", d, + _, _, endSpanHelper := driverbase.StartSpanWithEndSpanHelper(context.Background(), "FlightSQL.Database.CloseCachedClient", d, trace.WithAttributes( attribute.String("flight.location", fmt.Sprint(location)), attribute.String("flight.cache.reason", reason), @@ -536,7 +535,7 @@ func closeCachedFlightClient(d *databaseImpl, location, client interface{}, reas } func (d *databaseImpl) Open(ctx context.Context) (_ adbc.Connection, err error) { - ctx, span, endSpanHelper := internal.StartSpanWithEndSpanHelper( + ctx, span, endSpanHelper := driverbase.StartSpanWithEndSpanHelper( ctx, "FlightSQL.Database.Open", d, @@ -562,7 +561,7 @@ func (d *databaseImpl) Open(ctx context.Context) (_ adbc.Connection, err error) cache := gcache.New(20).LRU(). Expiration(5 * time.Minute). LoaderFunc(func(loc interface{}) (_ interface{}, err error) { - ctx, cacheSpan, endCacheSpanHelper := internal.StartSpanWithEndSpanHelper(context.Background(), "FlightSQL.Database.LoadCachedClient", d) + ctx, cacheSpan, endCacheSpanHelper := driverbase.StartSpanWithEndSpanHelper(context.Background(), "FlightSQL.Database.LoadCachedClient", d) defer func() { endCacheSpanHelper.WithError(err).EndSpan() }() diff --git a/go/adbc/driver/flightsql/flightsql_driver.go b/go/flightsql/flightsql_driver.go similarity index 99% rename from go/adbc/driver/flightsql/flightsql_driver.go rename to go/flightsql/flightsql_driver.go index 090d7c1661..458eafc4aa 100644 --- a/go/adbc/driver/flightsql/flightsql_driver.go +++ b/go/flightsql/flightsql_driver.go @@ -45,7 +45,7 @@ import ( "time" "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-go/v18/arrow/memory" "golang.org/x/exp/maps" "google.golang.org/grpc" diff --git a/go/adbc/driver/flightsql/flightsql_oauth.go b/go/flightsql/flightsql_oauth.go similarity index 100% rename from go/adbc/driver/flightsql/flightsql_oauth.go rename to go/flightsql/flightsql_oauth.go diff --git a/go/adbc/driver/flightsql/flightsql_statement.go b/go/flightsql/flightsql_statement.go similarity index 97% rename from go/adbc/driver/flightsql/flightsql_statement.go rename to go/flightsql/flightsql_statement.go index ec11ec9bd4..85730977dd 100644 --- a/go/adbc/driver/flightsql/flightsql_statement.go +++ b/go/flightsql/flightsql_statement.go @@ -29,7 +29,7 @@ import ( "unsafe" "github.com/apache/arrow-adbc/go/adbc" - "github.com/apache/arrow-adbc/go/adbc/driver/internal" + "github.com/apache/arrow-adbc/go/adbc/driver/driverbase" "github.com/apache/arrow-go/v18/arrow" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/flight" @@ -523,7 +523,7 @@ func (s *statement) ExecuteQuery(ctx context.Context) (rdr array.RecordReader, n spanName = "FlightSQL.Statement." + operationName ) startTime := time.Now() - ctx, span, endSpanHelper := internal.StartSpanWithEndSpanHelper(ctx, spanName, s.cnxn, trace.WithAttributes(traceHeaderAttrsWithPrefix(s.hdrs, traceRequestMetadataPrefix)...)) + ctx, span, endSpanHelper := driverbase.StartSpanWithEndSpanHelper(ctx, spanName, s.cnxn, trace.WithAttributes(traceHeaderAttrsWithPrefix(s.hdrs, traceRequestMetadataPrefix)...)) defer func() { endSpanHelper.WithError(err).EndSpan() }() @@ -599,7 +599,7 @@ func (s *statement) ExecuteUpdate(ctx context.Context) (n int64, err error) { spanName = "FlightSQL.Statement." + operationName ) startTime := time.Now() - ctx, span, endSpanHelper := internal.StartSpanWithEndSpanHelper(ctx, spanName, s.cnxn, trace.WithAttributes(traceHeaderAttrsWithPrefix(s.hdrs, traceRequestMetadataPrefix)...)) + ctx, span, endSpanHelper := driverbase.StartSpanWithEndSpanHelper(ctx, spanName, s.cnxn, trace.WithAttributes(traceHeaderAttrsWithPrefix(s.hdrs, traceRequestMetadataPrefix)...)) defer func() { endSpanHelper.WithError(err).EndSpan() }() @@ -661,7 +661,7 @@ func (s *statement) Prepare(ctx context.Context) (err error) { spanName = "FlightSQL.Statement." + operationName ) startTime := time.Now() - ctx, span, endSpanHelper := internal.StartSpanWithEndSpanHelper(ctx, spanName, s.cnxn, trace.WithAttributes(traceHeaderAttrsWithPrefix(s.hdrs, traceRequestMetadataPrefix)...)) + ctx, span, endSpanHelper := driverbase.StartSpanWithEndSpanHelper(ctx, spanName, s.cnxn, trace.WithAttributes(traceHeaderAttrsWithPrefix(s.hdrs, traceRequestMetadataPrefix)...)) defer func() { endSpanHelper.WithError(err).EndSpan() }() diff --git a/go/adbc/driver/flightsql/flightsql_tracing.go b/go/flightsql/flightsql_tracing.go similarity index 100% rename from go/adbc/driver/flightsql/flightsql_tracing.go rename to go/flightsql/flightsql_tracing.go diff --git a/go/adbc/driver/internal/shared_utils.go b/go/flightsql/get_objects.go similarity index 67% rename from go/adbc/driver/internal/shared_utils.go rename to go/flightsql/get_objects.go index 8446d0f6e6..5564b08965 100644 --- a/go/adbc/driver/internal/shared_utils.go +++ b/go/flightsql/get_objects.go @@ -15,33 +15,19 @@ // specific language governing permissions and limitations // under the License. -package internal +package flightsql import ( "context" "regexp" "strconv" "strings" - "time" "github.com/apache/arrow-adbc/go/adbc" + "github.com/apache/arrow-adbc/go/adbc/driver/driverbase" "github.com/apache/arrow-go/v18/arrow" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/memory" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - semconv "go.opentelemetry.io/otel/semconv/v1.30.0" - "go.opentelemetry.io/otel/trace" -) - -const ( - Unique = "UNIQUE" - PrimaryKey = "PRIMARY KEY" - ForeignKey = "FOREIGN KEY" -) - -var ( - AcceptAll = regexp.MustCompile(".*") ) type CatalogAndSchema struct { @@ -503,14 +489,14 @@ func (c *DefaultXdbcMetadataBuilder) findInt16Val(key string) (int16, bool) { } func (c *DefaultXdbcMetadataBuilder) SetOrdinalPosition(defaultPos int32, b *array.Int32Builder) { - if v, ok := c.findInt32Val(ORDINAL_POSITION); ok { + if v, ok := c.findInt32Val(driverbase.ORDINAL_POSITION); ok { b.Append(v) } else { b.Append(defaultPos) } } func (b *DefaultXdbcMetadataBuilder) SetRemarks(builder *array.StringBuilder) { - if v, ok := b.findStrVal(REMARKS); ok { + if v, ok := b.findStrVal(driverbase.REMARKS); ok { builder.Append(v) } else { builder.AppendNull() @@ -518,15 +504,15 @@ func (b *DefaultXdbcMetadataBuilder) SetRemarks(builder *array.StringBuilder) { } func (b *DefaultXdbcMetadataBuilder) SetXdbcDataType(columnType arrow.DataType, builder *array.Int16Builder) { - if v, ok := b.findInt16Val(XDBC_DATA_TYPE); ok { + if v, ok := b.findInt16Val(driverbase.XDBC_DATA_TYPE); ok { builder.Append(v) } else { - builder.Append(int16(ToXdbcDataType(columnType))) + builder.Append(int16(driverbase.ToXdbcDataType(columnType))) } } func (b *DefaultXdbcMetadataBuilder) SetXdbcTypeName(builder *array.StringBuilder) { - if v, ok := b.findStrVal(XDBC_TYPE_NAME); ok { + if v, ok := b.findStrVal(driverbase.XDBC_TYPE_NAME); ok { builder.Append(v) } else { builder.AppendNull() @@ -534,7 +520,7 @@ func (b *DefaultXdbcMetadataBuilder) SetXdbcTypeName(builder *array.StringBuilde } func (b *DefaultXdbcMetadataBuilder) SetXdbcColumnSize(builder *array.Int32Builder) { - if v, ok := b.findInt32Val(XDBC_COLUMN_SIZE); ok { + if v, ok := b.findInt32Val(driverbase.XDBC_COLUMN_SIZE); ok { builder.Append(v) } else { builder.AppendNull() @@ -542,7 +528,7 @@ func (b *DefaultXdbcMetadataBuilder) SetXdbcColumnSize(builder *array.Int32Build } func (b *DefaultXdbcMetadataBuilder) SetXdbcDecimalDigits(builder *array.Int16Builder) { - if v, ok := b.findInt16Val(XDBC_DECIMAL_DIGITS); ok { + if v, ok := b.findInt16Val(driverbase.XDBC_DECIMAL_DIGITS); ok { builder.Append(v) } else { builder.AppendNull() @@ -550,7 +536,7 @@ func (b *DefaultXdbcMetadataBuilder) SetXdbcDecimalDigits(builder *array.Int16Bu } func (b *DefaultXdbcMetadataBuilder) SetXdbcNumPrecRadix(builder *array.Int16Builder) { - if v, ok := b.findInt16Val(XDBC_NUM_PREC_RADIX); ok { + if v, ok := b.findInt16Val(driverbase.XDBC_NUM_PREC_RADIX); ok { builder.Append(v) } else { builder.AppendNull() @@ -558,7 +544,7 @@ func (b *DefaultXdbcMetadataBuilder) SetXdbcNumPrecRadix(builder *array.Int16Bui } func (b *DefaultXdbcMetadataBuilder) SetXdbcNullable(builder *array.Int16Builder) { - if v, ok := b.findInt16Val(XDBC_NULLABLE); ok { + if v, ok := b.findInt16Val(driverbase.XDBC_NULLABLE); ok { builder.Append(v) } else { builder.AppendNull() @@ -566,7 +552,7 @@ func (b *DefaultXdbcMetadataBuilder) SetXdbcNullable(builder *array.Int16Builder } func (b *DefaultXdbcMetadataBuilder) SetXdbcColumnDef(builder *array.StringBuilder) { - if v, ok := b.findStrVal(XDBC_COLUMN_DEF); ok { + if v, ok := b.findStrVal(driverbase.XDBC_COLUMN_DEF); ok { builder.Append(v) } else { builder.AppendNull() @@ -574,7 +560,7 @@ func (b *DefaultXdbcMetadataBuilder) SetXdbcColumnDef(builder *array.StringBuild } func (b *DefaultXdbcMetadataBuilder) SetXdbcSqlDataType(columnType arrow.DataType, builder *array.Int16Builder) { - if v, ok := b.findInt16Val(XDBC_SQL_DATA_TYPE); ok { + if v, ok := b.findInt16Val(driverbase.XDBC_SQL_DATA_TYPE); ok { builder.Append(v) } else { builder.AppendNull() @@ -582,7 +568,7 @@ func (b *DefaultXdbcMetadataBuilder) SetXdbcSqlDataType(columnType arrow.DataTyp } func (b *DefaultXdbcMetadataBuilder) SetXdbcDatetimeSub(builder *array.Int16Builder) { - if v, ok := b.findInt16Val(XDBC_DATETIME_SUB); ok { + if v, ok := b.findInt16Val(driverbase.XDBC_DATETIME_SUB); ok { builder.Append(v) } else { builder.AppendNull() @@ -590,7 +576,7 @@ func (b *DefaultXdbcMetadataBuilder) SetXdbcDatetimeSub(builder *array.Int16Buil } func (b *DefaultXdbcMetadataBuilder) SetXdbcCharOctetLength(builder *array.Int32Builder) { - if v, ok := b.findInt32Val(XDBC_CHAR_OCTET_LENGTH); ok { + if v, ok := b.findInt32Val(driverbase.XDBC_CHAR_OCTET_LENGTH); ok { builder.Append(v) } else { builder.AppendNull() @@ -598,7 +584,7 @@ func (b *DefaultXdbcMetadataBuilder) SetXdbcCharOctetLength(builder *array.Int32 } func (b *DefaultXdbcMetadataBuilder) SetXdbcIsNullable(builder *array.StringBuilder) { - if v, ok := b.findStrVal(XDBC_IS_NULLABLE); ok { + if v, ok := b.findStrVal(driverbase.XDBC_IS_NULLABLE); ok { builder.Append(v) } else { builder.AppendNull() @@ -606,7 +592,7 @@ func (b *DefaultXdbcMetadataBuilder) SetXdbcIsNullable(builder *array.StringBuil } func (b *DefaultXdbcMetadataBuilder) SetXdbcScopeCatalog(builder *array.StringBuilder) { - if v, ok := b.findStrVal(XDBC_SCOPE_CATALOG); ok { + if v, ok := b.findStrVal(driverbase.XDBC_SCOPE_CATALOG); ok { builder.Append(v) } else { builder.AppendNull() @@ -614,7 +600,7 @@ func (b *DefaultXdbcMetadataBuilder) SetXdbcScopeCatalog(builder *array.StringBu } func (b *DefaultXdbcMetadataBuilder) SetXdbcScopeSchema(builder *array.StringBuilder) { - if v, ok := b.findStrVal(XDBC_SCOPE_SCHEMA); ok { + if v, ok := b.findStrVal(driverbase.XDBC_SCOPE_SCHEMA); ok { builder.Append(v) } else { builder.AppendNull() @@ -622,7 +608,7 @@ func (b *DefaultXdbcMetadataBuilder) SetXdbcScopeSchema(builder *array.StringBui } func (b *DefaultXdbcMetadataBuilder) SetXdbcScopeTable(builder *array.StringBuilder) { - if v, ok := b.findStrVal(XDBC_SCOPE_TABLE); ok { + if v, ok := b.findStrVal(driverbase.XDBC_SCOPE_TABLE); ok { builder.Append(v) } else { builder.AppendNull() @@ -630,7 +616,7 @@ func (b *DefaultXdbcMetadataBuilder) SetXdbcScopeTable(builder *array.StringBuil } func (b *DefaultXdbcMetadataBuilder) SetXdbcIsAutoincrement(builder *array.BooleanBuilder) { - if v, ok := b.findBoolVal(XDBC_IS_AUTOINCREMENT); ok { + if v, ok := b.findBoolVal(driverbase.XDBC_IS_AUTOINCREMENT); ok { builder.Append(v) } else { builder.AppendNull() @@ -638,250 +624,9 @@ func (b *DefaultXdbcMetadataBuilder) SetXdbcIsAutoincrement(builder *array.Boole } func (b *DefaultXdbcMetadataBuilder) SetXdbcIsAutogeneratedColumn(builder *array.BooleanBuilder) { - if v, ok := b.findBoolVal(XDBC_IS_AUTOGENERATEDCOLUMN); ok { + if v, ok := b.findBoolVal(driverbase.XDBC_IS_AUTOGENERATEDCOLUMN); ok { builder.Append(v) } else { builder.AppendNull() } } - -const ( - COLUMN_NAME = "COLUMN_NAME" - ORDINAL_POSITION = "ORDINAL_POSITION" - REMARKS = "REMARKS" - XDBC_DATA_TYPE = "XDBC_DATA_TYPE" - XDBC_TYPE_NAME = "XDBC_TYPE_NAME" - XDBC_COLUMN_SIZE = "XDBC_COLUMN_SIZE" - XDBC_DECIMAL_DIGITS = "XDBC_DECIMAL_DIGITS" - XDBC_NUM_PREC_RADIX = "XDBC_NUM_PREC_RADIX" - XDBC_NULLABLE = "XDBC_NULLABLE" - XDBC_COLUMN_DEF = "XDBC_COLUMN_DEF" - XDBC_SQL_DATA_TYPE = "XDBC_SQL_DATA_TYPE" - XDBC_DATETIME_SUB = "XDBC_DATETIME_SUB" - XDBC_CHAR_OCTET_LENGTH = "XDBC_CHAR_OCTET_LENGTH" - XDBC_IS_NULLABLE = "XDBC_IS_NULLABLE" - XDBC_SCOPE_CATALOG = "XDBC_SCOPE_CATALOG" - XDBC_SCOPE_SCHEMA = "XDBC_SCOPE_SCHEMA" - XDBC_SCOPE_TABLE = "XDBC_SCOPE_TABLE" - XDBC_IS_AUTOINCREMENT = "XDBC_IS_AUTOINCREMENT" - XDBC_IS_AUTOGENERATEDCOLUMN = "XDBC_IS_AUTOGENERATEDCOLUMN" -) - -// The JDBC/ODBC-defined type of any object. -// All the values here are the sames as in the JDBC and ODBC specs. -type XdbcDataType int32 - -const ( - XdbcDataType_XDBC_UNKNOWN_TYPE XdbcDataType = 0 - XdbcDataType_XDBC_CHAR XdbcDataType = 1 - XdbcDataType_XDBC_NUMERIC XdbcDataType = 2 - XdbcDataType_XDBC_DECIMAL XdbcDataType = 3 - XdbcDataType_XDBC_INTEGER XdbcDataType = 4 - XdbcDataType_XDBC_SMALLINT XdbcDataType = 5 - XdbcDataType_XDBC_FLOAT XdbcDataType = 6 - XdbcDataType_XDBC_REAL XdbcDataType = 7 - XdbcDataType_XDBC_DOUBLE XdbcDataType = 8 - XdbcDataType_XDBC_DATETIME XdbcDataType = 9 - XdbcDataType_XDBC_INTERVAL XdbcDataType = 10 - XdbcDataType_XDBC_VARCHAR XdbcDataType = 12 - XdbcDataType_XDBC_DATE XdbcDataType = 91 - XdbcDataType_XDBC_TIME XdbcDataType = 92 - XdbcDataType_XDBC_TIMESTAMP XdbcDataType = 93 - XdbcDataType_XDBC_LONGVARCHAR XdbcDataType = -1 - XdbcDataType_XDBC_BINARY XdbcDataType = -2 - XdbcDataType_XDBC_VARBINARY XdbcDataType = -3 - XdbcDataType_XDBC_LONGVARBINARY XdbcDataType = -4 - XdbcDataType_XDBC_BIGINT XdbcDataType = -5 - XdbcDataType_XDBC_TINYINT XdbcDataType = -6 - XdbcDataType_XDBC_BIT XdbcDataType = -7 - XdbcDataType_XDBC_WCHAR XdbcDataType = -8 - XdbcDataType_XDBC_WVARCHAR XdbcDataType = -9 -) - -func ToXdbcDataType(dt arrow.DataType) (xdbcType XdbcDataType) { - if dt == nil { - return XdbcDataType_XDBC_UNKNOWN_TYPE - } - - switch dt.ID() { - case arrow.EXTENSION: - return ToXdbcDataType(dt.(arrow.ExtensionType).StorageType()) - case arrow.DICTIONARY: - return ToXdbcDataType(dt.(*arrow.DictionaryType).ValueType) - case arrow.RUN_END_ENCODED: - return ToXdbcDataType(dt.(*arrow.RunEndEncodedType).Encoded()) - case arrow.INT8, arrow.UINT8: - return XdbcDataType_XDBC_TINYINT - case arrow.INT16, arrow.UINT16: - return XdbcDataType_XDBC_SMALLINT - case arrow.INT32, arrow.UINT32: - return XdbcDataType_XDBC_INTEGER - case arrow.INT64, arrow.UINT64: - return XdbcDataType_XDBC_BIGINT - case arrow.FLOAT32, arrow.FLOAT16, arrow.FLOAT64: - return XdbcDataType_XDBC_FLOAT - case arrow.DECIMAL, arrow.DECIMAL256: - return XdbcDataType_XDBC_DECIMAL - case arrow.STRING, arrow.LARGE_STRING: - return XdbcDataType_XDBC_VARCHAR - case arrow.BINARY, arrow.LARGE_BINARY: - return XdbcDataType_XDBC_BINARY - case arrow.FIXED_SIZE_BINARY: - return XdbcDataType_XDBC_BINARY - case arrow.BOOL: - return XdbcDataType_XDBC_BIT - case arrow.TIME32, arrow.TIME64: - return XdbcDataType_XDBC_TIME - case arrow.DATE32, arrow.DATE64: - return XdbcDataType_XDBC_DATE - case arrow.TIMESTAMP: - return XdbcDataType_XDBC_TIMESTAMP - case arrow.DENSE_UNION, arrow.SPARSE_UNION: - return XdbcDataType_XDBC_VARBINARY - case arrow.LIST, arrow.LARGE_LIST, arrow.FIXED_SIZE_LIST: - return XdbcDataType_XDBC_VARBINARY - case arrow.STRUCT, arrow.MAP: - return XdbcDataType_XDBC_VARBINARY - default: - return XdbcDataType_XDBC_UNKNOWN_TYPE - } -} - -// Starts a trace.Span with the given spanName for the tracing object with -// the given ctx context. -func StartSpan(ctx context.Context, spanName string, tracing adbc.OTelTracing, opts ...trace.SpanStartOption) (context.Context, trace.Span) { - if tracing == nil { - return ctx, trace.SpanFromContext(ctx) - } - - attrs := tracing.GetInitialSpanAttributes() - attrs = append(attrs, semconv.DBOperationName(spanName)) - opts = append(opts, trace.WithAttributes(attrs...)) - - return tracing.StartSpan(ctx, spanName, opts...) -} - -// Starts a trace.Span with the given spanName for the tracing object with -// the given ctx context. Returns an EndSpanHelper to centralize span completion for operations that may fail. -func StartSpanWithEndSpanHelper(ctx context.Context, spanName string, tracing adbc.OTelTracing, opts ...trace.SpanStartOption) (context.Context, trace.Span, *EndSpanHelper) { - startTime := time.Now() - if tracing == nil { - span := trace.SpanFromContext(ctx) - return ctx, span, NewEndSpanHelper(span).WithStartTime(startTime) - } - - attrs := tracing.GetInitialSpanAttributes() - attrs = append(attrs, semconv.DBOperationName(spanName)) - opts = append(opts, trace.WithAttributes(attrs...)) - - newCtx, span := tracing.StartSpan(ctx, spanName, opts...) - return newCtx, span, NewEndSpanHelper(span).WithStartTime(startTime) -} - -// Ends the given span. If err is not nil, then the -// error is recorded and the status is set appropriately. -// Otherwise, the status is set to Ok. -func EndSpan(span trace.Span, err error, options ...trace.SpanEndOption) { - if err != nil { - span.RecordError(err) - if adbcError, ok := err.(adbc.Error); ok { - span.SetAttributes(semconv.ErrorTypeKey.String(adbcError.Code.String())) - } - span.SetStatus(codes.Error, err.Error()) - } else { - span.SetStatus(codes.Ok, "") - } - span.End(options...) -} - -// Ends the given span. If err is not nil, then the -// error is recorded and the status is set appropriately. -// Otherwise, the status is set to Ok. -func EndSpanWithError(span trace.Span, err *error, options ...trace.SpanEndOption) { - if err != nil && *err != nil { - span.RecordError(*err) - setSpanStatus(span, *err) - } else { - setSpanStatus(span, nil) - } - span.End(options...) -} - -// EndSpanHelper centralizes span completion for operations that may fail. -// It records errors when present, records the elapsed duration if a start time -// was provided, and ensures the span status and end options are applied uniformly. -type EndSpanHelper struct { - span trace.Span - err *error - errorRecorded bool - startTime *time.Time - options []trace.SpanEndOption -} - -// NewEndSpanHelper creates a helper for finalizing a span after an operation. -func NewEndSpanHelper(span trace.Span) *EndSpanHelper { - return &EndSpanHelper{ - span: span, - errorRecorded: false, - startTime: nil, - err: nil, - } -} - -// WithError configures the error to be recorded and reported on the span. -// It returns the helper itself to allow fluent chaining. -func (h *EndSpanHelper) WithError(err error) *EndSpanHelper { - h.err = &err - return h -} - -// WithRecordedError marks whether an error has already been recorded elsewhere. -// It returns the helper itself to allow fluent chaining. -func (h *EndSpanHelper) WithRecordedError(errorRecorded bool) *EndSpanHelper { - h.errorRecorded = errorRecorded - return h -} - -// WithOptions sets the span end options to apply when the span is closed. -// It returns the helper itself to allow fluent chaining. -func (h *EndSpanHelper) WithOptions(options ...trace.SpanEndOption) *EndSpanHelper { - h.options = options - return h -} - -// WithStartTime sets the operation start time so the elapsed duration can be recorded. -// It returns the helper itself to allow fluent chaining. -func (h *EndSpanHelper) WithStartTime(startTime time.Time) *EndSpanHelper { - h.startTime = &startTime - return h -} - -// EndSpan completes the span, records any error, sets status, and emits duration metadata if available. -func (h *EndSpanHelper) EndSpan() { - if h.span == nil { - return - } - if h.startTime != nil { - h.span.SetAttributes(attribute.Float64("span.duration_s", time.Since(*h.startTime).Seconds())) - } - if !h.errorRecorded && h.err != nil && *h.err != nil { - h.span.RecordError(*h.err) - } - if h.err != nil && *h.err != nil { - setSpanStatus(h.span, *h.err) - } else { - setSpanStatus(h.span, nil) - } - h.span.End(h.options...) -} - -func setSpanStatus(span trace.Span, err error) { - if err != nil { - if adbcError, ok := err.(adbc.Error); ok { - span.SetAttributes(semconv.ErrorTypeKey.String(adbcError.Code.String())) - } - span.SetStatus(codes.Error, err.Error()) - } else { - span.SetStatus(codes.Ok, "") - } -} diff --git a/go/flightsql/go.mod b/go/flightsql/go.mod new file mode 100644 index 0000000000..638541e2b6 --- /dev/null +++ b/go/flightsql/go.mod @@ -0,0 +1,81 @@ +// 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. + +module github.com/apache/arrow-adbc/go/flightsql + +go 1.26.0 + +toolchain go1.26.8 + +require ( + github.com/apache/arrow-adbc/go/adbc v1.12.0 + github.com/apache/arrow-go/v18 v18.7.0 + github.com/bluele/gcache v0.0.2 + github.com/golang/protobuf v1.5.4 + github.com/google/uuid v1.6.0 + github.com/stretchr/testify v1.12.1 + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.71.0 + go.opentelemetry.io/otel v1.46.0 + go.opentelemetry.io/otel/sdk v1.46.0 + go.opentelemetry.io/otel/trace v1.46.0 + golang.org/x/exp v0.0.0-20260824195058-e88cd73687aa + golang.org/x/oauth2 v0.36.0 + golang.org/x/sync v0.22.0 + google.golang.org/grpc v1.83.2 + google.golang.org/protobuf v1.36.12 + modernc.org/sqlite v1.58.0 +) + +require ( + cloud.google.com/go/compute/metadata v0.9.0 // indirect + github.com/cenkalti/backoff/v5 v5.0.3 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect + github.com/dustin/go-humanize v1.0.1 // indirect + github.com/go-logr/logr v1.4.4 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/goccy/go-json v0.10.6 // indirect + github.com/google/flatbuffers v25.12.19+incompatible // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 // indirect + github.com/klauspost/compress v1.19.0 // indirect + github.com/klauspost/cpuid/v2 v2.4.0 // indirect + github.com/mattn/go-isatty v0.0.24 // indirect + github.com/ncruces/go-strftime v1.0.0 // indirect + github.com/pierrec/lz4/v4 v4.1.27 // indirect + github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect + github.com/stoewer/go-strcase v1.3.1 // indirect + github.com/zeebo/xxh3 v1.1.0 // indirect + go.opentelemetry.io/auto/sdk v1.2.1 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.46.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.46.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.46.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.46.0 // indirect + go.opentelemetry.io/otel/metric v1.46.0 // indirect + go.opentelemetry.io/proto/otlp v1.11.0 // indirect + go.yaml.in/yaml/v3 v3.0.5 // indirect + golang.org/x/mod v0.39.0 // indirect + golang.org/x/net v0.58.0 // indirect + golang.org/x/sys v0.47.0 // indirect + golang.org/x/text v0.41.0 // indirect + golang.org/x/tools v0.49.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260819154853-08b0e4226688 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260825221802-da73d73af1c5 // indirect + modernc.org/libc v1.75.6 // indirect + modernc.org/mathutil v1.7.1 // indirect + modernc.org/memory v1.12.1 // indirect +) + +replace github.com/apache/arrow-adbc/go/adbc => ../adbc diff --git a/go/flightsql/go.sum b/go/flightsql/go.sum new file mode 100644 index 0000000000..40ab2aaf67 --- /dev/null +++ b/go/flightsql/go.sum @@ -0,0 +1,153 @@ +cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs= +cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10= +github.com/andybalholm/brotli v1.2.2 h1:HzTuoo2ErYQqf5qvcJInB8uvqSVxRttzkFexPWtnceM= +github.com/andybalholm/brotli v1.2.2/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY= +github.com/apache/arrow-go/v18 v18.7.0 h1:Vw/i+cJyebUofT7JlqFpe65LrmwxULn166jjwStM4HY= +github.com/apache/arrow-go/v18 v18.7.0/go.mod h1:PM6IigLJkdMwIpeHXnymo+xZ52f42a9EYiLtRel4p/A= +github.com/apache/thrift v0.24.0 h1:zy31L1a49QTNB2bG1BBfMXol3yJrTH975G3pPubQVLQ= +github.com/apache/thrift v0.24.0/go.mod h1:zPt6WxgvTOM6hF92y8C+MkEM5LMxZuk4JcQOiU4Esvs= +github.com/bluele/gcache v0.0.2 h1:WcbfdXICg7G/DGBh1PFfcirkWOQV+v077yF1pSy3DGw= +github.com/bluele/gcache v0.0.2/go.mod h1:m15KV+ECjptwSPxKhOhQoAFQVtUFjTVkc3H8o0t/fp0= +github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= +github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= +github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= +github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/goccy/go-json v0.10.6 h1:p8HrPJzOakx/mn/bQtjgNjdTcN+/S6FcG2CTtQOrHVU= +github.com/goccy/go-json v0.10.6/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= +github.com/google/flatbuffers v25.12.19+incompatible h1:haMV2JRRJCe1998HeW/p0X9UaMTK6SDo0ffLn2+DbLs= +github.com/google/flatbuffers v25.12.19+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/pprof v0.0.0-20260802141513-ef3492d7dac3 h1:LMLX+LgTNWpfvCBdFebv6EsYotImrt/Ppc5cXIriCSo= +github.com/google/pprof v0.0.0-20260802141513-ef3492d7dac3/go.mod h1:jl5iWTm0/hd5PjEYEOuwAJ57L/CibdZfrqZ5XA5GrCk= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 h1:/Tnpcb2E0Pz/tN9s3bfEY2Q8ePCEX9iuS+cneUwncnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0/go.mod h1:zOBXOsUaBSjKgmH4OGzV1esUpR3oUSCPYVd2cUBjKYY= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/klauspost/compress v1.19.0 h1:sXLILfc9jV2QYWkzFOPWStmcUVH2RHEB1JCdY2oVvCQ= +github.com/klauspost/compress v1.19.0/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ= +github.com/klauspost/cpuid/v2 v2.4.0 h1:S6Hrbc7+ywsr0r+RLapfGBHfyefhCTwEh3A0tV913Dw= +github.com/klauspost/cpuid/v2 v2.4.0/go.mod h1:19jmZ9mjzoF//ddRSUsv0zfBTJWh3QJh9FNxZTMrGxU= +github.com/mattn/go-isatty v0.0.24 h1:tGZZoVgT/KiqK1c8ocVLeDS8BSWMRd47J3Lbz7vsReI= +github.com/mattn/go-isatty v0.0.24/go.mod h1:nMCL3Zebbrt45jsMDgnfIwz6ydEQApk5oEI3HqDio6A= +github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w= +github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= +github.com/pierrec/lz4/v4 v4.1.27 h1:+PhzhWDrjRj89TH2sw43nE3+4+W8lSxIuQadEHZyjUk= +github.com/pierrec/lz4/v4 v4.1.27/go.mod h1:EoQMVJgeeEOMsCqCzqFm2O0cJvljX2nGZjcRIPL34O4= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= +github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= +github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4= +github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE= +github.com/stretchr/testify v1.12.1/go.mod h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg= +github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= +github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= +github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs= +github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s= +go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= +go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.71.0 h1:B2h3uqicet1CT2N5TOFhS+Gq++9i0/CLmaxvhmhtP5s= +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.71.0/go.mod h1:dylvB+ZiiwMvsDij9O84Uy7SijLgHMX4mbkncds+4Sw= +go.opentelemetry.io/otel v1.46.0 h1:FHt5/CDyVxi/8IM1CH7VE/rRgq3kLHa2mSTVMO8AWyc= +go.opentelemetry.io/otel v1.46.0/go.mod h1:Gj3SEScelsNC45tp4nSxRYlS+f5iez7W8XPMCt905kE= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.46.0 h1:OFnwLJr+pF3iHrlGSzbxyuo6/6HyBlnlN1CWEJmBVcw= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.46.0/go.mod h1:716wFneO0ov19A2beH5hjfh9AK5z/VWNAtDijp1Y0/g= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.46.0 h1:w53CDeOA/Kurp7yRsegSr6pbbr759dOvJ+yNmWM6Hxs= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.46.0/go.mod h1:BOmGMCbAtvcJiSJ+hLuhgPLdDbimnraSl8irz3iY8sY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.46.0 h1:KrC1YrQeSt46ITMWAbgQx1M1eV1/1TKzttrBzymPmss= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.46.0/go.mod h1:zDSEzoEqsOrgBeGvH66KRgxh90VonFyJqBHA0Pk3+rM= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.46.0 h1:KdRxPiAoMptR3vfWzvjjvutTsSiwbC2uG0496rzZNfo= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.46.0/go.mod h1:K/qSA+3G7Eovxi4K09wzrAgkWRnosS0DAOZeEpve7sM= +go.opentelemetry.io/otel/metric v1.46.0 h1:yBnkXvgV7AXFILZc5K6IZe/CBFF3OS7BJ8ov6/lj0K8= +go.opentelemetry.io/otel/metric v1.46.0/go.mod h1:iPmdWqifKUdzziPkvvzIJXITl56fQx2mGM/DHLB3/2o= +go.opentelemetry.io/otel/sdk v1.46.0 h1:h5CNQQjEbuQXY/JfZtgt3i7HVFV3aHPO2OAwO2eTYPI= +go.opentelemetry.io/otel/sdk v1.46.0/go.mod h1:GAERFXFt5SYCEB+YiKUbMBeza6UaDH7GmGOZEfh2gSM= +go.opentelemetry.io/otel/sdk/metric v1.46.0 h1:0piZ26EG4RBfebb2jhDH6ERCYHoVWduc3kLgPCwSnSE= +go.opentelemetry.io/otel/sdk/metric v1.46.0/go.mod h1:I1PbKrdVc8Qu8HYVDNtqVIwLwjNrhsV/uFuxfwg8mO4= +go.opentelemetry.io/otel/trace v1.46.0 h1:OULy7ccdJnZtJ0UDYFOIGaCmiWzJ8Vi2G/Rsu60qs1c= +go.opentelemetry.io/otel/trace v1.46.0/go.mod h1:J7GAXweO77XSFkB/rmAqk9D6ihszhFjLU+d9WuUxDLI= +go.opentelemetry.io/proto/otlp v1.11.0 h1:5rrYs0Ykyj50sdU/JU0x8etU+LubXWb+gED6TbEdMIk= +go.opentelemetry.io/proto/otlp v1.11.0/go.mod h1:SmVizdCOAm3XBtG1g1NnOdhW6jtddT72hLMhv8VwA8E= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= +go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= +golang.org/x/exp v0.0.0-20260824195058-e88cd73687aa h1:QSyA8ishJCyT21kER9KwNt0b7BM3iRK4x9QXhjN5Fdk= +golang.org/x/exp v0.0.0-20260824195058-e88cd73687aa/go.mod h1:zeBbvyFKDaLwa7CH/zI8KXt7gTl14SF7sO08Pl5jBCM= +golang.org/x/mod v0.39.0 h1:UF5zwQdCRRUpHfyPwr7d4UrGiVeldIsogtzWVnczL74= +golang.org/x/mod v0.39.0/go.mod h1:bvIbwjQ0HUFFf5AKukeeYQG4ZBUG9yxQbR9aEweIwYY= +golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= +golang.org/x/net v0.58.0/go.mod h1:YwCddHnFlT7eLQqVprV19OnhLGtc5xOKgE0RyqgfWAU= +golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= +golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= +golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= +golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs= +golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= +golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= +golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= +golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= +golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= +gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= +gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= +google.golang.org/genproto/googleapis/api v0.0.0-20260819154853-08b0e4226688 h1:ax2KzoSRIZU/M0cIxri3pKxy99vniH1PVxWC6si/eZI= +google.golang.org/genproto/googleapis/api v0.0.0-20260819154853-08b0e4226688/go.mod h1:1RJ9BQGyNdZwkGc1eTqkErfRZ6RJyYPHZo73BZ1vQqI= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260825221802-da73d73af1c5 h1:1VUiZAXyC+zmiFYi+WLtBzr68Cj8wOofHjjrA/kkizc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260825221802-da73d73af1c5/go.mod h1:DjtHYE8FKJLivXcBEjGwndXfIC23G0VpXiXKqG179uA= +google.golang.org/grpc v1.83.2 h1:EManeRomTObA0BU7I8vXgg/78uE5MJ9M8B39EX2WscU= +google.golang.org/grpc v1.83.2/go.mod h1:YPI1hK3kDked6iHvgX3tR0y+nX/qpMFKhPgFsokw1S8= +google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= +google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= +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= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +modernc.org/cc/v4 v4.29.2 h1:h6+9ciCnPKutf4I03CvheAvDLX7+IHlqR6Iy6J+cgd8= +modernc.org/cc/v4 v4.29.2/go.mod h1:OnovgIhbbMXMu1aISnJ0wvVD1KnW+cAUJkIrAWh+kVI= +modernc.org/ccgo/v4 v4.35.0 h1:F+TUsmw09QxLzmi3aeYYGxjAXarmZaKgj3mKQHNaA8w= +modernc.org/ccgo/v4 v4.35.0/go.mod h1:qrVGs9S3Sr2Ztcg9ve+kTAYMp5a3YvWjo+SoN06kJ5I= +modernc.org/fileutil v1.4.0 h1:j6ZzNTftVS054gi281TyLjHPp6CPHr2KCxEXjEbD6SM= +modernc.org/fileutil v1.4.0/go.mod h1:EqdKFDxiByqxLk8ozOxObDSfcVOv/54xDs/DUHdvCUU= +modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI= +modernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito= +modernc.org/gc/v3 v3.1.5 h1:21ldfPfRYE31Tb7B3mwAK8gy1AxP4+dKjrOQPfqakoc= +modernc.org/gc/v3 v3.1.5/go.mod h1:HFK/6AGESC7Ex+EZJhJ2Gni6cTaYpSMmU/cT9RmlfYY= +modernc.org/goabi0 v0.2.0 h1:HvEowk7LxcPd0eq6mVOAEMai46V+i7Jrj13t4AzuNks= +modernc.org/goabi0 v0.2.0/go.mod h1:CEFRnnJhKvWT1c1JTI3Avm+tgOWbkOu5oPA8eH8LnMI= +modernc.org/libc v1.75.6 h1:yKk8qo+Di4gkmvRboK8ocCqH22FiUCR6jRy2OwtCRus= +modernc.org/libc v1.75.6/go.mod h1:bO5o2ztHxBb2rjz0PgdHN0sSMw57CgxGFLZ3Qd/QpVQ= +modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU= +modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= +modernc.org/memory v1.12.1 h1:nFMiWrpStgZczNl6XI9GnIk/rWhYIyHGUaR04pGbp9g= +modernc.org/memory v1.12.1/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw= +modernc.org/opt v0.2.0 h1:tGyef5ApycA7FSEOMraay9SaTk5zmbx7Tu+cJs4QKZg= +modernc.org/opt v0.2.0/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns= +modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w= +modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE= +modernc.org/sqlite v1.58.0 h1:38u40/bwkfM7f0Myhosl+SEMltSDxnGdQf8o6Kjmys0= +modernc.org/sqlite v1.58.0/go.mod h1:rsD2CckafgObKC4DhBlGBf+RiHxkc3hINGt1Xw32tVY= +modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0= +modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A= +modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= +modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= diff --git a/go/adbc/driver/flightsql/logging.go b/go/flightsql/logging.go similarity index 100% rename from go/adbc/driver/flightsql/logging.go rename to go/flightsql/logging.go diff --git a/go/adbc/driver/flightsql/logging_test.go b/go/flightsql/logging_test.go similarity index 100% rename from go/adbc/driver/flightsql/logging_test.go rename to go/flightsql/logging_test.go diff --git a/go/adbc/pkg/flightsql/driver.go b/go/flightsql/pkg/driver.go similarity index 99% rename from go/adbc/pkg/flightsql/driver.go rename to go/flightsql/pkg/driver.go index 46506c4156..26ff10133c 100644 --- a/go/adbc/pkg/flightsql/driver.go +++ b/go/flightsql/pkg/driver.go @@ -26,7 +26,7 @@ package main // #cgo CFLAGS: -DADBC_EXPORTING // #cgo CXXFLAGS: -std=c++17 -DADBC_EXPORTING -// #include "../../drivermgr/arrow-adbc/adbc.h" +// #include "../../adbc/drivermgr/arrow-adbc/adbc.h" // #include "utils.h" // #include // #include @@ -61,7 +61,7 @@ import ( "unsafe" "github.com/apache/arrow-adbc/go/adbc" - "github.com/apache/arrow-adbc/go/adbc/driver/flightsql" + "github.com/apache/arrow-adbc/go/flightsql" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/cdata" "github.com/apache/arrow-go/v18/arrow/memory" diff --git a/go/adbc/pkg/flightsql/init.go b/go/flightsql/pkg/init.go similarity index 96% rename from go/adbc/pkg/flightsql/init.go rename to go/flightsql/pkg/init.go index 5d232e4a09..26b9d2ae0d 100644 --- a/go/adbc/pkg/flightsql/init.go +++ b/go/flightsql/pkg/init.go @@ -21,7 +21,7 @@ package main // #cgo CFLAGS: -DADBC_EXPORTING // #cgo CXXFLAGS: -std=c++17 -DADBC_EXPORTING -// #include "../../drivermgr/arrow-adbc/adbc.h" +// #include "../../adbc/drivermgr/arrow-adbc/adbc.h" // #include "utils.h" // #include // #include diff --git a/go/adbc/pkg/flightsql/utils.c b/go/flightsql/pkg/utils.c similarity index 100% rename from go/adbc/pkg/flightsql/utils.c rename to go/flightsql/pkg/utils.c diff --git a/go/adbc/pkg/flightsql/utils.h b/go/flightsql/pkg/utils.h similarity index 99% rename from go/adbc/pkg/flightsql/utils.h rename to go/flightsql/pkg/utils.h index 474865b23b..3658050ebf 100644 --- a/go/adbc/pkg/flightsql/utils.h +++ b/go/flightsql/pkg/utils.h @@ -24,7 +24,7 @@ #pragma once #include -#include "../../drivermgr/arrow-adbc/adbc.h" +#include "../../adbc/drivermgr/arrow-adbc/adbc.h" struct AdbcError* FlightSQLErrorFromArrayStream(struct ArrowArrayStream*, AdbcStatusCode*); diff --git a/go/adbc/driver/flightsql/record_reader.go b/go/flightsql/record_reader.go similarity index 98% rename from go/adbc/driver/flightsql/record_reader.go rename to go/flightsql/record_reader.go index c3f4c2741a..cbbb609e8a 100644 --- a/go/adbc/driver/flightsql/record_reader.go +++ b/go/flightsql/record_reader.go @@ -24,7 +24,7 @@ import ( "sync/atomic" "github.com/apache/arrow-adbc/go/adbc" - "github.com/apache/arrow-adbc/go/adbc/driver/internal" + "github.com/apache/arrow-adbc/go/adbc/driver/driverbase" "github.com/apache/arrow-adbc/go/adbc/utils" "github.com/apache/arrow-go/v18/arrow" "github.com/apache/arrow-go/v18/arrow/array" @@ -77,7 +77,7 @@ type recordReaderConfig struct { // reader which gathers all of the records as they come in. func newRecordReader(ctx context.Context, cfg recordReaderConfig, opts ...grpc.CallOption) (rdr array.RecordReader, err error) { const spanName = "FlightSQL.RecordReader.newRecordReader" - ctx, span, endSpanHelper := internal.StartSpanWithEndSpanHelper(ctx, spanName, cfg.tracing) + ctx, span, endSpanHelper := driverbase.StartSpanWithEndSpanHelper(ctx, spanName, cfg.tracing) spanOwnedByReader := false errorRecorded := false defer func() { diff --git a/go/adbc/driver/flightsql/record_reader_test.go b/go/flightsql/record_reader_test.go similarity index 100% rename from go/adbc/driver/flightsql/record_reader_test.go rename to go/flightsql/record_reader_test.go diff --git a/go/adbc/sqldriver/flightsql/README.md b/go/flightsql/sqldriver/README.md similarity index 89% rename from go/adbc/sqldriver/flightsql/README.md rename to go/flightsql/sqldriver/README.md index 4a659cc196..6f2c007bce 100644 --- a/go/adbc/sqldriver/flightsql/README.md +++ b/go/flightsql/sqldriver/README.md @@ -19,7 +19,7 @@ # flightsql - A FlightSQL driver for the database/sql package -[![Go Reference](https://pkg.go.dev/badge/github.com/apache/arrow-adbc/go/adbc/sqldriver/flightsql.svg)](https://pkg.go.dev/github.com/apache/arrow-adbc/go/adbc/sqldriver/flightsql) +[![Go Reference](https://pkg.go.dev/badge/github.com/apache/arrow-adbc/go/flightsql/sqldriver.svg)](https://pkg.go.dev/github.com/apache/arrow-adbc/go/flightsql/sqldriver) Golang database/sql driver for [FlightSQL](https://arrow.apache.org/docs/format/FlightSql.html). @@ -34,7 +34,7 @@ which is itself database/sql wrapper driver for any [ADBC](https://arrow.apache.org/docs/format/ADBC.html) driver. This package simply registers the -[FlightSQL ADBC driver](https://pkg.go.dev/github.com/apache/arrow-adbc/go/adbc/driver/flightsql) +[FlightSQL ADBC driver](https://pkg.go.dev/github.com/apache/arrow-adbc/go/flightsql) with the database/sql package. Understanding ADBC is not necessary to use this driver. @@ -45,7 +45,7 @@ package main import ( "database/sql" - _ "github.com/apache/arrow-adbc/go/adbc/sqldriver/flightsql" + _ "github.com/apache/arrow-adbc/go/flightsql/sqldriver" ) func main() { diff --git a/go/adbc/sqldriver/flightsql/flightsql.go b/go/flightsql/sqldriver/flightsql.go similarity index 89% rename from go/adbc/sqldriver/flightsql/flightsql.go rename to go/flightsql/sqldriver/flightsql.go index 671ad33632..794fc88093 100644 --- a/go/adbc/sqldriver/flightsql/flightsql.go +++ b/go/flightsql/sqldriver/flightsql.go @@ -20,13 +20,13 @@ package flightsql import ( "database/sql" - "github.com/apache/arrow-adbc/go/adbc/driver/flightsql" "github.com/apache/arrow-adbc/go/adbc/sqldriver" + driver "github.com/apache/arrow-adbc/go/flightsql" "github.com/apache/arrow-go/v18/arrow/memory" ) func init() { sql.Register("flightsql", sqldriver.Driver{ - Driver: flightsql.NewDriver(memory.DefaultAllocator), + Driver: driver.NewDriver(memory.DefaultAllocator), }) } diff --git a/go/adbc/sqldriver/flightsql/flightsql_test.go b/go/flightsql/sqldriver/flightsql_test.go similarity index 98% rename from go/adbc/sqldriver/flightsql/flightsql_test.go rename to go/flightsql/sqldriver/flightsql_test.go index eafa178fbc..aa8cc89392 100644 --- a/go/adbc/sqldriver/flightsql/flightsql_test.go +++ b/go/flightsql/sqldriver/flightsql_test.go @@ -22,8 +22,8 @@ import ( "os" "testing" - _ "github.com/apache/arrow-adbc/go/adbc/sqldriver/flightsql" "github.com/apache/arrow-adbc/go/adbc/validation" + _ "github.com/apache/arrow-adbc/go/flightsql/sqldriver" "github.com/apache/arrow-go/v18/arrow/flight" "github.com/apache/arrow-go/v18/arrow/flight/flightsql" "github.com/apache/arrow-go/v18/arrow/flight/flightsql/example" diff --git a/go/adbc/driver/flightsql/timeouts.go b/go/flightsql/timeouts.go similarity index 100% rename from go/adbc/driver/flightsql/timeouts.go rename to go/flightsql/timeouts.go diff --git a/go/adbc/driver/flightsql/tracing.go b/go/flightsql/tracing.go similarity index 100% rename from go/adbc/driver/flightsql/tracing.go rename to go/flightsql/tracing.go diff --git a/go/adbc/driver/flightsql/tracing_test.go b/go/flightsql/tracing_test.go similarity index 98% rename from go/adbc/driver/flightsql/tracing_test.go rename to go/flightsql/tracing_test.go index b88f7a19b4..e70c09cc5b 100644 --- a/go/adbc/driver/flightsql/tracing_test.go +++ b/go/flightsql/tracing_test.go @@ -21,7 +21,7 @@ import ( "context" "testing" - "github.com/apache/arrow-adbc/go/adbc/driver/internal" + "github.com/apache/arrow-adbc/go/adbc/driver/driverbase" "go.opentelemetry.io/otel/attribute" sdktrace "go.opentelemetry.io/otel/sdk/trace" "go.opentelemetry.io/otel/sdk/trace/tracetest" @@ -144,7 +144,7 @@ func TestTraceHeaderAttrsWithPrefix_AppliedToSpan(t *testing.T) { }, } - ctx, _, endSpanHelper := internal.StartSpanWithEndSpanHelper( + ctx, _, endSpanHelper := driverbase.StartSpanWithEndSpanHelper( context.Background(), "FlightSQL.Statement.ExecuteQuery", tracing, diff --git a/go/adbc/driver/flightsql/utils.go b/go/flightsql/utils.go similarity index 100% rename from go/adbc/driver/flightsql/utils.go rename to go/flightsql/utils.go diff --git a/r/adbcflightsql/configure b/r/adbcflightsql/configure index 7a666eaf4b..b8da414454 100755 --- a/r/adbcflightsql/configure +++ b/r/adbcflightsql/configure @@ -124,7 +124,7 @@ sed \ -e "s|@nproc@|$GOMAXPROCS|" \ src/Makevars.in > src/Makevars -if [ -f "src/go/adbc/pkg/flightsql/driver.go" ]; then +if [ -f "src/go/flightsql/pkg/driver.go" ]; then echo "Found vendored ADBC FlightSQL driver" exit 0 fi diff --git a/r/adbcflightsql/src/Makevars.in b/r/adbcflightsql/src/Makevars.in index 6221be292b..4dcceb7f1f 100644 --- a/r/adbcflightsql/src/Makevars.in +++ b/r/adbcflightsql/src/Makevars.in @@ -34,4 +34,4 @@ purify: $(SHLIB) rm -Rf "$(CURDIR)/go/libadbc_driver_flightsql.a" gostatic: - (cd "$(CURDIR)/go/adbc"; GOMAXPROCS=$(GOMAXPROCS) GOPATH="$(CURDIR)/.go-path" GOCACHE="$(CURDIR)/.go-cache" GOFLAGS=-modcacherw CC="$(CGO_CC)" CXX="$(CGO_CXX)" CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(PKG_LIBS)" "@gobin@" build -v -tags driverlib -o $(CURDIR)/go/libadbc_driver_flightsql.a -buildmode=c-archive "./pkg/flightsql") + (cd "$(CURDIR)/go/flightsql"; GOMAXPROCS=$(GOMAXPROCS) GOPATH="$(CURDIR)/.go-path" GOCACHE="$(CURDIR)/.go-cache" GOFLAGS=-modcacherw CC="$(CGO_CC)" CXX="$(CGO_CXX)" CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(PKG_LIBS)" "@gobin@" build -v -tags driverlib -o $(CURDIR)/go/libadbc_driver_flightsql.a -buildmode=c-archive "./pkg") diff --git a/r/tools/bootstrap-go.R b/r/tools/bootstrap-go.R index 63421318bd..e9081ca8bd 100644 --- a/r/tools/bootstrap-go.R +++ b/r/tools/bootstrap-go.R @@ -19,13 +19,13 @@ # directory. Technically this copies all go drivers but this is easier # than remembering the internal dependency structure of the go sources. files_to_vendor <- list.files( - "../../go/adbc", + "../../go", "\\.(go|mod|txt|sum|h|c|sql)$", recursive = TRUE ) -files_to_vendor_src <- file.path("../../go/adbc", files_to_vendor) -files_to_vendor_dst <- file.path("src/go/adbc", files_to_vendor) +files_to_vendor_src <- file.path("../../go", files_to_vendor) +files_to_vendor_dst <- file.path("src/go", files_to_vendor) # On Windows, file.copy does not handle symlinks. This # is not a problem for a user install, where this script @@ -35,6 +35,7 @@ dir.create("src/arrow-adbc", showWarnings = FALSE) file.copy("../../c/include/arrow-adbc/adbc.h", "src/arrow-adbc/adbc.h") unlink("src/go/adbc", recursive = TRUE) +unlink("src/go/flightsql", recursive = TRUE) cat( sprintf( From 306d86af7d3a4ffb0cb2531b69fdafdf33df4b24 Mon Sep 17 00:00:00 2001 From: David Li Date: Mon, 7 Sep 2026 10:49:55 +0900 Subject: [PATCH 2/9] fully move all drivers, re-hide driverbase --- go/adbc/go.mod | 20 +-------- go/adbc/go.sum | 41 ------------------- go/adbc/pkg/Makefile | 8 +--- .../flightsql/cmd/oauthserver/main.go | 0 .../flightsql/cmd/testserver/main.go | 0 .../flightsql/example_usage_test.go | 2 +- .../flightsql/flightsql_adbc_server_test.go | 4 +- .../flightsql/flightsql_adbc_test.go | 2 +- .../flightsql/flightsql_bulk_ingest.go | 2 +- .../flightsql/flightsql_connection.go | 2 +- .../flightsql/flightsql_database.go | 2 +- go/{ => driver}/flightsql/flightsql_driver.go | 2 +- go/{ => driver}/flightsql/flightsql_oauth.go | 0 .../flightsql/flightsql_statement.go | 2 +- .../flightsql/flightsql_tracing.go | 0 go/{ => driver}/flightsql/get_objects.go | 2 +- go/{ => driver}/flightsql/logging.go | 0 go/{ => driver}/flightsql/logging_test.go | 0 go/{ => driver}/flightsql/pkg/driver.go | 4 +- go/{ => driver}/flightsql/pkg/init.go | 2 +- go/{ => driver}/flightsql/pkg/utils.c | 0 go/{ => driver}/flightsql/pkg/utils.h | 2 +- go/{ => driver}/flightsql/record_reader.go | 2 +- .../flightsql/record_reader_test.go | 0 go/{ => driver}/flightsql/sqldriver/README.md | 6 +-- .../flightsql/sqldriver/flightsql.go | 2 +- .../flightsql/sqldriver/flightsql_test.go | 2 +- go/{ => driver}/flightsql/timeouts.go | 0 go/{ => driver}/flightsql/tracing.go | 0 go/{ => driver}/flightsql/tracing_test.go | 2 +- go/{ => driver}/flightsql/utils.go | 0 go/{flightsql => driver}/go.mod | 9 ++-- go/{flightsql => driver}/go.sum | 0 .../internal}/driverbase/connection.go | 0 .../internal}/driverbase/database.go | 0 .../internal}/driverbase/driver.go | 0 .../internal}/driverbase/driver_info.go | 0 .../internal}/driverbase/driver_info_test.go | 2 +- .../internal}/driverbase/driver_test.go | 2 +- .../internal}/driverbase/error.go | 0 .../internal}/driverbase/logging.go | 0 .../driverbase/rotating_file_writer.go | 0 .../driverbase/rotating_file_writer_test.go | 2 +- .../internal}/driverbase/shared_utils.go | 0 .../internal}/driverbase/statement.go | 0 .../driver/panicdummy/panicdummy_adbc.go | 0 .../panicdummy/pkg}/driver.go | 4 +- .../panicdummy/pkg}/utils.c | 0 .../panicdummy/pkg}/utils.h | 2 +- 49 files changed, 35 insertions(+), 97 deletions(-) rename go/{ => driver}/flightsql/cmd/oauthserver/main.go (100%) rename go/{ => driver}/flightsql/cmd/testserver/main.go (100%) rename go/{ => driver}/flightsql/example_usage_test.go (98%) rename go/{ => driver}/flightsql/flightsql_adbc_server_test.go (99%) rename go/{ => driver}/flightsql/flightsql_adbc_test.go (99%) rename go/{ => driver}/flightsql/flightsql_bulk_ingest.go (99%) rename go/{ => driver}/flightsql/flightsql_connection.go (99%) rename go/{ => driver}/flightsql/flightsql_database.go (99%) rename go/{ => driver}/flightsql/flightsql_driver.go (99%) rename go/{ => driver}/flightsql/flightsql_oauth.go (100%) rename go/{ => driver}/flightsql/flightsql_statement.go (99%) rename go/{ => driver}/flightsql/flightsql_tracing.go (100%) rename go/{ => driver}/flightsql/get_objects.go (99%) rename go/{ => driver}/flightsql/logging.go (100%) rename go/{ => driver}/flightsql/logging_test.go (100%) rename go/{ => driver}/flightsql/pkg/driver.go (99%) rename go/{ => driver}/flightsql/pkg/init.go (96%) rename go/{ => driver}/flightsql/pkg/utils.c (100%) rename go/{ => driver}/flightsql/pkg/utils.h (99%) rename go/{ => driver}/flightsql/record_reader.go (99%) rename go/{ => driver}/flightsql/record_reader_test.go (100%) rename go/{ => driver}/flightsql/sqldriver/README.md (89%) rename go/{ => driver}/flightsql/sqldriver/flightsql.go (94%) rename go/{ => driver}/flightsql/sqldriver/flightsql_test.go (98%) rename go/{ => driver}/flightsql/timeouts.go (100%) rename go/{ => driver}/flightsql/tracing.go (100%) rename go/{ => driver}/flightsql/tracing_test.go (99%) rename go/{ => driver}/flightsql/utils.go (100%) rename go/{flightsql => driver}/go.mod (95%) rename go/{flightsql => driver}/go.sum (100%) rename go/{adbc/driver => driver/internal}/driverbase/connection.go (100%) rename go/{adbc/driver => driver/internal}/driverbase/database.go (100%) rename go/{adbc/driver => driver/internal}/driverbase/driver.go (100%) rename go/{adbc/driver => driver/internal}/driverbase/driver_info.go (100%) rename go/{adbc/driver => driver/internal}/driverbase/driver_info_test.go (98%) rename go/{adbc/driver => driver/internal}/driverbase/driver_test.go (99%) rename go/{adbc/driver => driver/internal}/driverbase/error.go (100%) rename go/{adbc/driver => driver/internal}/driverbase/logging.go (100%) rename go/{adbc/driver => driver/internal}/driverbase/rotating_file_writer.go (100%) rename go/{adbc/driver => driver/internal}/driverbase/rotating_file_writer_test.go (98%) rename go/{adbc/driver => driver/internal}/driverbase/shared_utils.go (100%) rename go/{adbc/driver => driver/internal}/driverbase/statement.go (100%) rename go/{adbc => }/driver/panicdummy/panicdummy_adbc.go (100%) rename go/{adbc/pkg/panicdummy => driver/panicdummy/pkg}/driver.go (99%) rename go/{adbc/pkg/panicdummy => driver/panicdummy/pkg}/utils.c (100%) rename go/{adbc/pkg/panicdummy => driver/panicdummy/pkg}/utils.h (99%) diff --git a/go/adbc/go.mod b/go/adbc/go.mod index 95cc325009..db1177877c 100644 --- a/go/adbc/go.mod +++ b/go/adbc/go.mod @@ -26,41 +26,23 @@ require ( github.com/apache/arrow-go/v18 v18.7.0 github.com/stretchr/testify v1.12.1 go.opentelemetry.io/otel v1.46.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.46.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.46.0 - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.46.0 - go.opentelemetry.io/otel/sdk v1.46.0 go.opentelemetry.io/otel/trace v1.46.0 - golang.org/x/sync v0.22.0 golang.org/x/tools v0.49.0 google.golang.org/protobuf v1.36.12 ) require ( - github.com/cenkalti/backoff/v5 v5.0.3 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/go-logr/logr v1.4.4 // indirect - github.com/go-logr/stdr v1.2.2 // indirect github.com/goccy/go-json v0.10.6 // indirect github.com/google/flatbuffers v25.12.19+incompatible // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 // indirect github.com/klauspost/compress v1.19.0 // indirect github.com/klauspost/cpuid/v2 v2.4.0 // indirect github.com/pierrec/lz4/v4 v4.1.27 // indirect github.com/stretchr/objx v0.5.3 // indirect github.com/zeebo/xxh3 v1.1.0 // indirect - go.opentelemetry.io/auto/sdk v1.2.1 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.46.0 // indirect - go.opentelemetry.io/otel/metric v1.46.0 // indirect - go.opentelemetry.io/proto/otlp v1.11.0 // indirect go.yaml.in/yaml/v3 v3.0.5 // indirect golang.org/x/exp v0.0.0-20260112195511-716be5621a96 // indirect golang.org/x/mod v0.39.0 // indirect - golang.org/x/net v0.58.0 // indirect + golang.org/x/sync v0.22.0 // indirect golang.org/x/sys v0.47.0 // indirect - golang.org/x/text v0.41.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20260819154853-08b0e4226688 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20260819154853-08b0e4226688 // indirect - google.golang.org/grpc v1.83.1 // indirect ) diff --git a/go/adbc/go.sum b/go/adbc/go.sum index 31797c91d0..7c8979c093 100644 --- a/go/adbc/go.sum +++ b/go/adbc/go.sum @@ -4,27 +4,16 @@ github.com/apache/arrow-go/v18 v18.7.0 h1:Vw/i+cJyebUofT7JlqFpe65LrmwxULn166jjwS github.com/apache/arrow-go/v18 v18.7.0/go.mod h1:PM6IigLJkdMwIpeHXnymo+xZ52f42a9EYiLtRel4p/A= github.com/apache/thrift v0.24.0 h1:zy31L1a49QTNB2bG1BBfMXol3yJrTH975G3pPubQVLQ= github.com/apache/thrift v0.24.0/go.mod h1:zPt6WxgvTOM6hF92y8C+MkEM5LMxZuk4JcQOiU4Esvs= -github.com/cenkalti/backoff/v5 v5.0.3 h1:ZN+IMa753KfX5hd8vVaMixjnqRZ3y8CuJKRKj1xcsSM= -github.com/cenkalti/backoff/v5 v5.0.3/go.mod h1:rkhZdG3JZukswDf7f0cwqPNk4K0sa+F97BxZthm/crw= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.4 h1:tG4xh9yMsRCAiodLVTxyrkzSZ9+o0L1Kg/+cPVcbP/8= -github.com/go-logr/logr v1.4.4/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/goccy/go-json v0.10.6 h1:p8HrPJzOakx/mn/bQtjgNjdTcN+/S6FcG2CTtQOrHVU= github.com/goccy/go-json v0.10.6/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/flatbuffers v25.12.19+incompatible h1:haMV2JRRJCe1998HeW/p0X9UaMTK6SDo0ffLn2+DbLs= github.com/google/flatbuffers v25.12.19+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 h1:/Tnpcb2E0Pz/tN9s3bfEY2Q8ePCEX9iuS+cneUwncnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0/go.mod h1:zOBXOsUaBSjKgmH4OGzV1esUpR3oUSCPYVd2cUBjKYY= github.com/klauspost/compress v1.19.0 h1:sXLILfc9jV2QYWkzFOPWStmcUVH2RHEB1JCdY2oVvCQ= github.com/klauspost/compress v1.19.0/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ= github.com/klauspost/cpuid/v2 v2.4.0 h1:S6Hrbc7+ywsr0r+RLapfGBHfyefhCTwEh3A0tV913Dw= @@ -39,53 +28,23 @@ github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= github.com/zeebo/xxh3 v1.1.0 h1:s7DLGDK45Dyfg7++yxI0khrfwq9661w9EN78eP/UZVs= github.com/zeebo/xxh3 v1.1.0/go.mod h1:IisAie1LELR4xhVinxWS5+zf1lA4p0MW4T+w+W07F5s= -go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= -go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= go.opentelemetry.io/otel v1.46.0 h1:FHt5/CDyVxi/8IM1CH7VE/rRgq3kLHa2mSTVMO8AWyc= go.opentelemetry.io/otel v1.46.0/go.mod h1:Gj3SEScelsNC45tp4nSxRYlS+f5iez7W8XPMCt905kE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.46.0 h1:OFnwLJr+pF3iHrlGSzbxyuo6/6HyBlnlN1CWEJmBVcw= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.46.0/go.mod h1:716wFneO0ov19A2beH5hjfh9AK5z/VWNAtDijp1Y0/g= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.46.0 h1:w53CDeOA/Kurp7yRsegSr6pbbr759dOvJ+yNmWM6Hxs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.46.0/go.mod h1:BOmGMCbAtvcJiSJ+hLuhgPLdDbimnraSl8irz3iY8sY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.46.0 h1:KrC1YrQeSt46ITMWAbgQx1M1eV1/1TKzttrBzymPmss= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.46.0/go.mod h1:zDSEzoEqsOrgBeGvH66KRgxh90VonFyJqBHA0Pk3+rM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.46.0 h1:KdRxPiAoMptR3vfWzvjjvutTsSiwbC2uG0496rzZNfo= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.46.0/go.mod h1:K/qSA+3G7Eovxi4K09wzrAgkWRnosS0DAOZeEpve7sM= -go.opentelemetry.io/otel/metric v1.46.0 h1:yBnkXvgV7AXFILZc5K6IZe/CBFF3OS7BJ8ov6/lj0K8= -go.opentelemetry.io/otel/metric v1.46.0/go.mod h1:iPmdWqifKUdzziPkvvzIJXITl56fQx2mGM/DHLB3/2o= -go.opentelemetry.io/otel/sdk v1.46.0 h1:h5CNQQjEbuQXY/JfZtgt3i7HVFV3aHPO2OAwO2eTYPI= -go.opentelemetry.io/otel/sdk v1.46.0/go.mod h1:GAERFXFt5SYCEB+YiKUbMBeza6UaDH7GmGOZEfh2gSM= -go.opentelemetry.io/otel/sdk/metric v1.46.0 h1:0piZ26EG4RBfebb2jhDH6ERCYHoVWduc3kLgPCwSnSE= -go.opentelemetry.io/otel/sdk/metric v1.46.0/go.mod h1:I1PbKrdVc8Qu8HYVDNtqVIwLwjNrhsV/uFuxfwg8mO4= go.opentelemetry.io/otel/trace v1.46.0 h1:OULy7ccdJnZtJ0UDYFOIGaCmiWzJ8Vi2G/Rsu60qs1c= go.opentelemetry.io/otel/trace v1.46.0/go.mod h1:J7GAXweO77XSFkB/rmAqk9D6ihszhFjLU+d9WuUxDLI= -go.opentelemetry.io/proto/otlp v1.11.0 h1:5rrYs0Ykyj50sdU/JU0x8etU+LubXWb+gED6TbEdMIk= -go.opentelemetry.io/proto/otlp v1.11.0/go.mod h1:SmVizdCOAm3XBtG1g1NnOdhW6jtddT72hLMhv8VwA8E= -go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= -go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw= go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg= golang.org/x/exp v0.0.0-20260112195511-716be5621a96 h1:Z/6YuSHTLOHfNFdb8zVZomZr7cqNgTJvA8+Qz75D8gU= golang.org/x/exp v0.0.0-20260112195511-716be5621a96/go.mod h1:nzimsREAkjBCIEFtHiYkrJyT+2uy9YZJB7H1k68CXZU= golang.org/x/mod v0.39.0 h1:UF5zwQdCRRUpHfyPwr7d4UrGiVeldIsogtzWVnczL74= golang.org/x/mod v0.39.0/go.mod h1:bvIbwjQ0HUFFf5AKukeeYQG4ZBUG9yxQbR9aEweIwYY= -golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= -golang.org/x/net v0.58.0/go.mod h1:YwCddHnFlT7eLQqVprV19OnhLGtc5xOKgE0RyqgfWAU= golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs= golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= -golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= -golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= golang.org/x/tools v0.49.0 h1:3NI7VXzL9+1WZD52Dx2ttoPwD5DWrFGpl9mFZDlmisI= golang.org/x/tools v0.49.0/go.mod h1:SJNXV9DBKT0UbdttsQjbfJlAE/q+y36++zo3uL3N0Oo= gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= -google.golang.org/genproto/googleapis/api v0.0.0-20260819154853-08b0e4226688 h1:ax2KzoSRIZU/M0cIxri3pKxy99vniH1PVxWC6si/eZI= -google.golang.org/genproto/googleapis/api v0.0.0-20260819154853-08b0e4226688/go.mod h1:1RJ9BQGyNdZwkGc1eTqkErfRZ6RJyYPHZo73BZ1vQqI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260819154853-08b0e4226688 h1:cYNAzI2sUwhmCcoj9TxvihSrqsxt6uIkj3rDRhSDmW4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260819154853-08b0e4226688/go.mod h1:DjtHYE8FKJLivXcBEjGwndXfIC23G0VpXiXKqG179uA= -google.golang.org/grpc v1.83.1 h1:HIO0+BEtBP6soyqvqC8sNUjZ7bTs+0hFQuFF+RAy++Y= -google.golang.org/grpc v1.83.1/go.mod h1:kDyl6SKsiHKt0uylY5gtn5cEjkrIOhQOGDgIc4JGwzQ= google.golang.org/protobuf v1.36.12 h1:pJOKDDOyeXErUroCihFAd5LQuwXBSpVnKGrj5o/fwxc= google.golang.org/protobuf v1.36.12/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= diff --git a/go/adbc/pkg/Makefile b/go/adbc/pkg/Makefile index 65e4c6e255..6449f23c57 100644 --- a/go/adbc/pkg/Makefile +++ b/go/adbc/pkg/Makefile @@ -47,12 +47,8 @@ DRIVERS := $(addsuffix .$(SUFFIX),$(addprefix libadbc_driver_,$(MANAGERS))) .PHONY: all regenerate all: $(DRIVERS) -libadbc_driver_%.$(SUFFIX): ../../% ../../%/pkg ../../%/go.mod ../../%/go.sum - $(GO_BUILD) -C ../../$* -buildvcs=true -tags driverlib -o $(CURDIR)/$@ -buildmode=c-shared -ldflags "-X github.com/apache/arrow-adbc/go/adbc/driver/driverbase.infoDriverVersion=$(VERSION)" ./pkg - $(RM) $(basename $@).h - -libadbc_driver_%.$(SUFFIX): % ../driver/% ../go.mod ../go.sum - $(GO_BUILD) -buildvcs=true -tags driverlib -o $@ -buildmode=c-shared -ldflags "-X github.com/apache/arrow-adbc/go/adbc/driver/driverbase.infoDriverVersion=$(VERSION)" ./$* +libadbc_driver_%.$(SUFFIX): ../../driver/% ../../driver/%/pkg ../../driver/go.mod ../../driver/go.sum + $(GO_BUILD) -C ../../driver/$* -buildvcs=true -tags driverlib -o $(CURDIR)/$@ -buildmode=c-shared -ldflags "-X github.com/apache/arrow-adbc/go/adbc/driver/internal/driverbase.infoDriverVersion=$(VERSION)" ./pkg $(RM) $(basename $@).h regenerate: diff --git a/go/flightsql/cmd/oauthserver/main.go b/go/driver/flightsql/cmd/oauthserver/main.go similarity index 100% rename from go/flightsql/cmd/oauthserver/main.go rename to go/driver/flightsql/cmd/oauthserver/main.go diff --git a/go/flightsql/cmd/testserver/main.go b/go/driver/flightsql/cmd/testserver/main.go similarity index 100% rename from go/flightsql/cmd/testserver/main.go rename to go/driver/flightsql/cmd/testserver/main.go diff --git a/go/flightsql/example_usage_test.go b/go/driver/flightsql/example_usage_test.go similarity index 98% rename from go/flightsql/example_usage_test.go rename to go/driver/flightsql/example_usage_test.go index a59dac90b1..4ec6bf3fa7 100644 --- a/go/flightsql/example_usage_test.go +++ b/go/driver/flightsql/example_usage_test.go @@ -29,7 +29,7 @@ import ( "log" "github.com/apache/arrow-adbc/go/adbc" - drv "github.com/apache/arrow-adbc/go/flightsql" + drv "github.com/apache/arrow-adbc/go/driver/flightsql" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/flight" "github.com/apache/arrow-go/v18/arrow/flight/flightsql" diff --git a/go/flightsql/flightsql_adbc_server_test.go b/go/driver/flightsql/flightsql_adbc_server_test.go similarity index 99% rename from go/flightsql/flightsql_adbc_server_test.go rename to go/driver/flightsql/flightsql_adbc_server_test.go index 03e3f37e63..0140a0514f 100644 --- a/go/flightsql/flightsql_adbc_server_test.go +++ b/go/driver/flightsql/flightsql_adbc_server_test.go @@ -47,9 +47,9 @@ import ( "github.com/google/uuid" "github.com/apache/arrow-adbc/go/adbc" - "github.com/apache/arrow-adbc/go/adbc/driver/driverbase" + "github.com/apache/arrow-adbc/go/driver/internal/driverbase" "github.com/apache/arrow-adbc/go/adbc/validation" - driver "github.com/apache/arrow-adbc/go/flightsql" + driver "github.com/apache/arrow-adbc/go/driver/flightsql" "github.com/apache/arrow-go/v18/arrow" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/flight" diff --git a/go/flightsql/flightsql_adbc_test.go b/go/driver/flightsql/flightsql_adbc_test.go similarity index 99% rename from go/flightsql/flightsql_adbc_test.go rename to go/driver/flightsql/flightsql_adbc_test.go index 4d4f364d7c..734b8a782f 100644 --- a/go/flightsql/flightsql_adbc_test.go +++ b/go/driver/flightsql/flightsql_adbc_test.go @@ -45,7 +45,7 @@ import ( "github.com/apache/arrow-adbc/go/adbc" "github.com/apache/arrow-adbc/go/adbc/validation" - driver "github.com/apache/arrow-adbc/go/flightsql" + driver "github.com/apache/arrow-adbc/go/driver/flightsql" "github.com/apache/arrow-go/v18/arrow" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/flight" diff --git a/go/flightsql/flightsql_bulk_ingest.go b/go/driver/flightsql/flightsql_bulk_ingest.go similarity index 99% rename from go/flightsql/flightsql_bulk_ingest.go rename to go/driver/flightsql/flightsql_bulk_ingest.go index 15f01c2757..4829bbae98 100644 --- a/go/flightsql/flightsql_bulk_ingest.go +++ b/go/driver/flightsql/flightsql_bulk_ingest.go @@ -23,7 +23,7 @@ import ( "time" "github.com/apache/arrow-adbc/go/adbc" - "github.com/apache/arrow-adbc/go/adbc/driver/driverbase" + "github.com/apache/arrow-adbc/go/driver/internal/driverbase" "github.com/apache/arrow-go/v18/arrow" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/flight/flightsql" diff --git a/go/flightsql/flightsql_connection.go b/go/driver/flightsql/flightsql_connection.go similarity index 99% rename from go/flightsql/flightsql_connection.go rename to go/driver/flightsql/flightsql_connection.go index 96f6319975..399831a25c 100644 --- a/go/flightsql/flightsql_connection.go +++ b/go/driver/flightsql/flightsql_connection.go @@ -28,7 +28,7 @@ import ( "time" "github.com/apache/arrow-adbc/go/adbc" - "github.com/apache/arrow-adbc/go/adbc/driver/driverbase" + "github.com/apache/arrow-adbc/go/driver/internal/driverbase" "github.com/apache/arrow-go/v18/arrow" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/flight" diff --git a/go/flightsql/flightsql_database.go b/go/driver/flightsql/flightsql_database.go similarity index 99% rename from go/flightsql/flightsql_database.go rename to go/driver/flightsql/flightsql_database.go index 1a8ba65014..08cf8a8698 100644 --- a/go/flightsql/flightsql_database.go +++ b/go/driver/flightsql/flightsql_database.go @@ -30,7 +30,7 @@ import ( "time" "github.com/apache/arrow-adbc/go/adbc" - "github.com/apache/arrow-adbc/go/adbc/driver/driverbase" + "github.com/apache/arrow-adbc/go/driver/internal/driverbase" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/flight" "github.com/apache/arrow-go/v18/arrow/flight/flightsql" diff --git a/go/flightsql/flightsql_driver.go b/go/driver/flightsql/flightsql_driver.go similarity index 99% rename from go/flightsql/flightsql_driver.go rename to go/driver/flightsql/flightsql_driver.go index 458eafc4aa..0dd20c52a4 100644 --- a/go/flightsql/flightsql_driver.go +++ b/go/driver/flightsql/flightsql_driver.go @@ -45,7 +45,7 @@ import ( "time" "github.com/apache/arrow-adbc/go/adbc" - "github.com/apache/arrow-adbc/go/adbc/driver/driverbase" + "github.com/apache/arrow-adbc/go/driver/internal/driverbase" "github.com/apache/arrow-go/v18/arrow/memory" "golang.org/x/exp/maps" "google.golang.org/grpc" diff --git a/go/flightsql/flightsql_oauth.go b/go/driver/flightsql/flightsql_oauth.go similarity index 100% rename from go/flightsql/flightsql_oauth.go rename to go/driver/flightsql/flightsql_oauth.go diff --git a/go/flightsql/flightsql_statement.go b/go/driver/flightsql/flightsql_statement.go similarity index 99% rename from go/flightsql/flightsql_statement.go rename to go/driver/flightsql/flightsql_statement.go index 85730977dd..437a1b1694 100644 --- a/go/flightsql/flightsql_statement.go +++ b/go/driver/flightsql/flightsql_statement.go @@ -29,7 +29,7 @@ import ( "unsafe" "github.com/apache/arrow-adbc/go/adbc" - "github.com/apache/arrow-adbc/go/adbc/driver/driverbase" + "github.com/apache/arrow-adbc/go/driver/internal/driverbase" "github.com/apache/arrow-go/v18/arrow" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/flight" diff --git a/go/flightsql/flightsql_tracing.go b/go/driver/flightsql/flightsql_tracing.go similarity index 100% rename from go/flightsql/flightsql_tracing.go rename to go/driver/flightsql/flightsql_tracing.go diff --git a/go/flightsql/get_objects.go b/go/driver/flightsql/get_objects.go similarity index 99% rename from go/flightsql/get_objects.go rename to go/driver/flightsql/get_objects.go index 5564b08965..39e79cfe26 100644 --- a/go/flightsql/get_objects.go +++ b/go/driver/flightsql/get_objects.go @@ -24,7 +24,7 @@ import ( "strings" "github.com/apache/arrow-adbc/go/adbc" - "github.com/apache/arrow-adbc/go/adbc/driver/driverbase" + "github.com/apache/arrow-adbc/go/driver/internal/driverbase" "github.com/apache/arrow-go/v18/arrow" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/memory" diff --git a/go/flightsql/logging.go b/go/driver/flightsql/logging.go similarity index 100% rename from go/flightsql/logging.go rename to go/driver/flightsql/logging.go diff --git a/go/flightsql/logging_test.go b/go/driver/flightsql/logging_test.go similarity index 100% rename from go/flightsql/logging_test.go rename to go/driver/flightsql/logging_test.go diff --git a/go/flightsql/pkg/driver.go b/go/driver/flightsql/pkg/driver.go similarity index 99% rename from go/flightsql/pkg/driver.go rename to go/driver/flightsql/pkg/driver.go index 26ff10133c..2e2866eeb9 100644 --- a/go/flightsql/pkg/driver.go +++ b/go/driver/flightsql/pkg/driver.go @@ -26,7 +26,7 @@ package main // #cgo CFLAGS: -DADBC_EXPORTING // #cgo CXXFLAGS: -std=c++17 -DADBC_EXPORTING -// #include "../../adbc/drivermgr/arrow-adbc/adbc.h" +// #include "../../../adbc/drivermgr/arrow-adbc/adbc.h" // #include "utils.h" // #include // #include @@ -61,7 +61,7 @@ import ( "unsafe" "github.com/apache/arrow-adbc/go/adbc" - "github.com/apache/arrow-adbc/go/flightsql" + "github.com/apache/arrow-adbc/go/driver/flightsql" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/cdata" "github.com/apache/arrow-go/v18/arrow/memory" diff --git a/go/flightsql/pkg/init.go b/go/driver/flightsql/pkg/init.go similarity index 96% rename from go/flightsql/pkg/init.go rename to go/driver/flightsql/pkg/init.go index 26b9d2ae0d..94c6d699c2 100644 --- a/go/flightsql/pkg/init.go +++ b/go/driver/flightsql/pkg/init.go @@ -21,7 +21,7 @@ package main // #cgo CFLAGS: -DADBC_EXPORTING // #cgo CXXFLAGS: -std=c++17 -DADBC_EXPORTING -// #include "../../adbc/drivermgr/arrow-adbc/adbc.h" +// #include "../../../adbc/drivermgr/arrow-adbc/adbc.h" // #include "utils.h" // #include // #include diff --git a/go/flightsql/pkg/utils.c b/go/driver/flightsql/pkg/utils.c similarity index 100% rename from go/flightsql/pkg/utils.c rename to go/driver/flightsql/pkg/utils.c diff --git a/go/flightsql/pkg/utils.h b/go/driver/flightsql/pkg/utils.h similarity index 99% rename from go/flightsql/pkg/utils.h rename to go/driver/flightsql/pkg/utils.h index 3658050ebf..75991ce300 100644 --- a/go/flightsql/pkg/utils.h +++ b/go/driver/flightsql/pkg/utils.h @@ -24,7 +24,7 @@ #pragma once #include -#include "../../adbc/drivermgr/arrow-adbc/adbc.h" +#include "../../../adbc/drivermgr/arrow-adbc/adbc.h" struct AdbcError* FlightSQLErrorFromArrayStream(struct ArrowArrayStream*, AdbcStatusCode*); diff --git a/go/flightsql/record_reader.go b/go/driver/flightsql/record_reader.go similarity index 99% rename from go/flightsql/record_reader.go rename to go/driver/flightsql/record_reader.go index cbbb609e8a..d2349f486f 100644 --- a/go/flightsql/record_reader.go +++ b/go/driver/flightsql/record_reader.go @@ -24,7 +24,7 @@ import ( "sync/atomic" "github.com/apache/arrow-adbc/go/adbc" - "github.com/apache/arrow-adbc/go/adbc/driver/driverbase" + "github.com/apache/arrow-adbc/go/driver/internal/driverbase" "github.com/apache/arrow-adbc/go/adbc/utils" "github.com/apache/arrow-go/v18/arrow" "github.com/apache/arrow-go/v18/arrow/array" diff --git a/go/flightsql/record_reader_test.go b/go/driver/flightsql/record_reader_test.go similarity index 100% rename from go/flightsql/record_reader_test.go rename to go/driver/flightsql/record_reader_test.go diff --git a/go/flightsql/sqldriver/README.md b/go/driver/flightsql/sqldriver/README.md similarity index 89% rename from go/flightsql/sqldriver/README.md rename to go/driver/flightsql/sqldriver/README.md index 6f2c007bce..4f3e8b1a6f 100644 --- a/go/flightsql/sqldriver/README.md +++ b/go/driver/flightsql/sqldriver/README.md @@ -19,7 +19,7 @@ # flightsql - A FlightSQL driver for the database/sql package -[![Go Reference](https://pkg.go.dev/badge/github.com/apache/arrow-adbc/go/flightsql/sqldriver.svg)](https://pkg.go.dev/github.com/apache/arrow-adbc/go/flightsql/sqldriver) +[![Go Reference](https://pkg.go.dev/badge/github.com/apache/arrow-adbc/go/driver/flightsql/sqldriver.svg)](https://pkg.go.dev/github.com/apache/arrow-adbc/go/driver/flightsql/sqldriver) Golang database/sql driver for [FlightSQL](https://arrow.apache.org/docs/format/FlightSql.html). @@ -34,7 +34,7 @@ which is itself database/sql wrapper driver for any [ADBC](https://arrow.apache.org/docs/format/ADBC.html) driver. This package simply registers the -[FlightSQL ADBC driver](https://pkg.go.dev/github.com/apache/arrow-adbc/go/flightsql) +[FlightSQL ADBC driver](https://pkg.go.dev/github.com/apache/arrow-adbc/go/driver/flightsql) with the database/sql package. Understanding ADBC is not necessary to use this driver. @@ -45,7 +45,7 @@ package main import ( "database/sql" - _ "github.com/apache/arrow-adbc/go/flightsql/sqldriver" + _ "github.com/apache/arrow-adbc/go/driver/flightsql/sqldriver" ) func main() { diff --git a/go/flightsql/sqldriver/flightsql.go b/go/driver/flightsql/sqldriver/flightsql.go similarity index 94% rename from go/flightsql/sqldriver/flightsql.go rename to go/driver/flightsql/sqldriver/flightsql.go index 794fc88093..5cceaa8a9a 100644 --- a/go/flightsql/sqldriver/flightsql.go +++ b/go/driver/flightsql/sqldriver/flightsql.go @@ -21,7 +21,7 @@ import ( "database/sql" "github.com/apache/arrow-adbc/go/adbc/sqldriver" - driver "github.com/apache/arrow-adbc/go/flightsql" + driver "github.com/apache/arrow-adbc/go/driver/flightsql" "github.com/apache/arrow-go/v18/arrow/memory" ) diff --git a/go/flightsql/sqldriver/flightsql_test.go b/go/driver/flightsql/sqldriver/flightsql_test.go similarity index 98% rename from go/flightsql/sqldriver/flightsql_test.go rename to go/driver/flightsql/sqldriver/flightsql_test.go index aa8cc89392..abf775f8c0 100644 --- a/go/flightsql/sqldriver/flightsql_test.go +++ b/go/driver/flightsql/sqldriver/flightsql_test.go @@ -23,7 +23,7 @@ import ( "testing" "github.com/apache/arrow-adbc/go/adbc/validation" - _ "github.com/apache/arrow-adbc/go/flightsql/sqldriver" + _ "github.com/apache/arrow-adbc/go/driver/flightsql/sqldriver" "github.com/apache/arrow-go/v18/arrow/flight" "github.com/apache/arrow-go/v18/arrow/flight/flightsql" "github.com/apache/arrow-go/v18/arrow/flight/flightsql/example" diff --git a/go/flightsql/timeouts.go b/go/driver/flightsql/timeouts.go similarity index 100% rename from go/flightsql/timeouts.go rename to go/driver/flightsql/timeouts.go diff --git a/go/flightsql/tracing.go b/go/driver/flightsql/tracing.go similarity index 100% rename from go/flightsql/tracing.go rename to go/driver/flightsql/tracing.go diff --git a/go/flightsql/tracing_test.go b/go/driver/flightsql/tracing_test.go similarity index 99% rename from go/flightsql/tracing_test.go rename to go/driver/flightsql/tracing_test.go index e70c09cc5b..f86f96249e 100644 --- a/go/flightsql/tracing_test.go +++ b/go/driver/flightsql/tracing_test.go @@ -21,7 +21,7 @@ import ( "context" "testing" - "github.com/apache/arrow-adbc/go/adbc/driver/driverbase" + "github.com/apache/arrow-adbc/go/driver/internal/driverbase" "go.opentelemetry.io/otel/attribute" sdktrace "go.opentelemetry.io/otel/sdk/trace" "go.opentelemetry.io/otel/sdk/trace/tracetest" diff --git a/go/flightsql/utils.go b/go/driver/flightsql/utils.go similarity index 100% rename from go/flightsql/utils.go rename to go/driver/flightsql/utils.go diff --git a/go/flightsql/go.mod b/go/driver/go.mod similarity index 95% rename from go/flightsql/go.mod rename to go/driver/go.mod index 638541e2b6..18fb50fec8 100644 --- a/go/flightsql/go.mod +++ b/go/driver/go.mod @@ -15,7 +15,7 @@ // specific language governing permissions and limitations // under the License. -module github.com/apache/arrow-adbc/go/flightsql +module github.com/apache/arrow-adbc/go/driver go 1.26.0 @@ -30,6 +30,9 @@ require ( github.com/stretchr/testify v1.12.1 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.71.0 go.opentelemetry.io/otel v1.46.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.46.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.46.0 + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.46.0 go.opentelemetry.io/otel/sdk v1.46.0 go.opentelemetry.io/otel/trace v1.46.0 golang.org/x/exp v0.0.0-20260824195058-e88cd73687aa @@ -57,12 +60,10 @@ require ( github.com/pierrec/lz4/v4 v4.1.27 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/stoewer/go-strcase v1.3.1 // indirect + github.com/stretchr/objx v0.5.3 // indirect github.com/zeebo/xxh3 v1.1.0 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.46.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.46.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.46.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.46.0 // indirect go.opentelemetry.io/otel/metric v1.46.0 // indirect go.opentelemetry.io/proto/otlp v1.11.0 // indirect go.yaml.in/yaml/v3 v3.0.5 // indirect diff --git a/go/flightsql/go.sum b/go/driver/go.sum similarity index 100% rename from go/flightsql/go.sum rename to go/driver/go.sum diff --git a/go/adbc/driver/driverbase/connection.go b/go/driver/internal/driverbase/connection.go similarity index 100% rename from go/adbc/driver/driverbase/connection.go rename to go/driver/internal/driverbase/connection.go diff --git a/go/adbc/driver/driverbase/database.go b/go/driver/internal/driverbase/database.go similarity index 100% rename from go/adbc/driver/driverbase/database.go rename to go/driver/internal/driverbase/database.go diff --git a/go/adbc/driver/driverbase/driver.go b/go/driver/internal/driverbase/driver.go similarity index 100% rename from go/adbc/driver/driverbase/driver.go rename to go/driver/internal/driverbase/driver.go diff --git a/go/adbc/driver/driverbase/driver_info.go b/go/driver/internal/driverbase/driver_info.go similarity index 100% rename from go/adbc/driver/driverbase/driver_info.go rename to go/driver/internal/driverbase/driver_info.go diff --git a/go/adbc/driver/driverbase/driver_info_test.go b/go/driver/internal/driverbase/driver_info_test.go similarity index 98% rename from go/adbc/driver/driverbase/driver_info_test.go rename to go/driver/internal/driverbase/driver_info_test.go index 9af17a49f4..b8c64e89be 100644 --- a/go/adbc/driver/driverbase/driver_info_test.go +++ b/go/driver/internal/driverbase/driver_info_test.go @@ -21,7 +21,7 @@ import ( "testing" "github.com/apache/arrow-adbc/go/adbc" - "github.com/apache/arrow-adbc/go/adbc/driver/driverbase" + "github.com/apache/arrow-adbc/go/driver/internal/driverbase" "github.com/stretchr/testify/require" ) diff --git a/go/adbc/driver/driverbase/driver_test.go b/go/driver/internal/driverbase/driver_test.go similarity index 99% rename from go/adbc/driver/driverbase/driver_test.go rename to go/driver/internal/driverbase/driver_test.go index c9afd41e45..8e0f63d226 100644 --- a/go/adbc/driver/driverbase/driver_test.go +++ b/go/driver/internal/driverbase/driver_test.go @@ -27,7 +27,7 @@ import ( "testing" "github.com/apache/arrow-adbc/go/adbc" - "github.com/apache/arrow-adbc/go/adbc/driver/driverbase" + "github.com/apache/arrow-adbc/go/driver/internal/driverbase" "github.com/apache/arrow-adbc/go/adbc/validation" "github.com/apache/arrow-go/v18/arrow" "github.com/apache/arrow-go/v18/arrow/array" diff --git a/go/adbc/driver/driverbase/error.go b/go/driver/internal/driverbase/error.go similarity index 100% rename from go/adbc/driver/driverbase/error.go rename to go/driver/internal/driverbase/error.go diff --git a/go/adbc/driver/driverbase/logging.go b/go/driver/internal/driverbase/logging.go similarity index 100% rename from go/adbc/driver/driverbase/logging.go rename to go/driver/internal/driverbase/logging.go diff --git a/go/adbc/driver/driverbase/rotating_file_writer.go b/go/driver/internal/driverbase/rotating_file_writer.go similarity index 100% rename from go/adbc/driver/driverbase/rotating_file_writer.go rename to go/driver/internal/driverbase/rotating_file_writer.go diff --git a/go/adbc/driver/driverbase/rotating_file_writer_test.go b/go/driver/internal/driverbase/rotating_file_writer_test.go similarity index 98% rename from go/adbc/driver/driverbase/rotating_file_writer_test.go rename to go/driver/internal/driverbase/rotating_file_writer_test.go index ad5e9cd30b..1f36b107b9 100644 --- a/go/adbc/driver/driverbase/rotating_file_writer_test.go +++ b/go/driver/internal/driverbase/rotating_file_writer_test.go @@ -23,7 +23,7 @@ import ( "runtime" "testing" - "github.com/apache/arrow-adbc/go/adbc/driver/driverbase" + "github.com/apache/arrow-adbc/go/driver/internal/driverbase" "github.com/stretchr/testify/require" ) diff --git a/go/adbc/driver/driverbase/shared_utils.go b/go/driver/internal/driverbase/shared_utils.go similarity index 100% rename from go/adbc/driver/driverbase/shared_utils.go rename to go/driver/internal/driverbase/shared_utils.go diff --git a/go/adbc/driver/driverbase/statement.go b/go/driver/internal/driverbase/statement.go similarity index 100% rename from go/adbc/driver/driverbase/statement.go rename to go/driver/internal/driverbase/statement.go diff --git a/go/adbc/driver/panicdummy/panicdummy_adbc.go b/go/driver/panicdummy/panicdummy_adbc.go similarity index 100% rename from go/adbc/driver/panicdummy/panicdummy_adbc.go rename to go/driver/panicdummy/panicdummy_adbc.go diff --git a/go/adbc/pkg/panicdummy/driver.go b/go/driver/panicdummy/pkg/driver.go similarity index 99% rename from go/adbc/pkg/panicdummy/driver.go rename to go/driver/panicdummy/pkg/driver.go index 2deea3f886..a3dcb785c5 100644 --- a/go/adbc/pkg/panicdummy/driver.go +++ b/go/driver/panicdummy/pkg/driver.go @@ -26,7 +26,7 @@ package main // #cgo CFLAGS: -DADBC_EXPORTING // #cgo CXXFLAGS: -std=c++17 -DADBC_EXPORTING -// #include "../../drivermgr/arrow-adbc/adbc.h" +// #include "../../../adbc/drivermgr/arrow-adbc/adbc.h" // #include "utils.h" // #include // #include @@ -61,7 +61,7 @@ import ( "unsafe" "github.com/apache/arrow-adbc/go/adbc" - "github.com/apache/arrow-adbc/go/adbc/driver/panicdummy" + "github.com/apache/arrow-adbc/go/driver/panicdummy" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/cdata" "github.com/apache/arrow-go/v18/arrow/memory" diff --git a/go/adbc/pkg/panicdummy/utils.c b/go/driver/panicdummy/pkg/utils.c similarity index 100% rename from go/adbc/pkg/panicdummy/utils.c rename to go/driver/panicdummy/pkg/utils.c diff --git a/go/adbc/pkg/panicdummy/utils.h b/go/driver/panicdummy/pkg/utils.h similarity index 99% rename from go/adbc/pkg/panicdummy/utils.h rename to go/driver/panicdummy/pkg/utils.h index d092d16fdd..16a29c1422 100644 --- a/go/adbc/pkg/panicdummy/utils.h +++ b/go/driver/panicdummy/pkg/utils.h @@ -24,7 +24,7 @@ #pragma once #include -#include "../../drivermgr/arrow-adbc/adbc.h" +#include "../../../adbc/drivermgr/arrow-adbc/adbc.h" struct AdbcError* PanicDummyErrorFromArrayStream(struct ArrowArrayStream*, AdbcStatusCode*); From a9b956231b95637c7f952c4035a7a467de961b99 Mon Sep 17 00:00:00 2001 From: David Li Date: Mon, 7 Sep 2026 10:52:00 +0900 Subject: [PATCH 3/9] lint --- dev/release/rat_exclude_files.txt | 2 +- go/driver/flightsql/flightsql_adbc_server_test.go | 2 +- go/driver/flightsql/record_reader.go | 2 +- go/driver/internal/driverbase/driver_test.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dev/release/rat_exclude_files.txt b/dev/release/rat_exclude_files.txt index 273b8e1fcb..359b71b27e 100644 --- a/dev/release/rat_exclude_files.txt +++ b/dev/release/rat_exclude_files.txt @@ -35,7 +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 +go/driver/go.sum java/.mvn/jvm.config python/*/*/py.typed rat.txt diff --git a/go/driver/flightsql/flightsql_adbc_server_test.go b/go/driver/flightsql/flightsql_adbc_server_test.go index 0140a0514f..f9f06f52d0 100644 --- a/go/driver/flightsql/flightsql_adbc_server_test.go +++ b/go/driver/flightsql/flightsql_adbc_server_test.go @@ -47,9 +47,9 @@ import ( "github.com/google/uuid" "github.com/apache/arrow-adbc/go/adbc" - "github.com/apache/arrow-adbc/go/driver/internal/driverbase" "github.com/apache/arrow-adbc/go/adbc/validation" driver "github.com/apache/arrow-adbc/go/driver/flightsql" + "github.com/apache/arrow-adbc/go/driver/internal/driverbase" "github.com/apache/arrow-go/v18/arrow" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/flight" diff --git a/go/driver/flightsql/record_reader.go b/go/driver/flightsql/record_reader.go index d2349f486f..f178d3a148 100644 --- a/go/driver/flightsql/record_reader.go +++ b/go/driver/flightsql/record_reader.go @@ -24,8 +24,8 @@ import ( "sync/atomic" "github.com/apache/arrow-adbc/go/adbc" - "github.com/apache/arrow-adbc/go/driver/internal/driverbase" "github.com/apache/arrow-adbc/go/adbc/utils" + "github.com/apache/arrow-adbc/go/driver/internal/driverbase" "github.com/apache/arrow-go/v18/arrow" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/flight" diff --git a/go/driver/internal/driverbase/driver_test.go b/go/driver/internal/driverbase/driver_test.go index 8e0f63d226..00976a00e0 100644 --- a/go/driver/internal/driverbase/driver_test.go +++ b/go/driver/internal/driverbase/driver_test.go @@ -27,8 +27,8 @@ import ( "testing" "github.com/apache/arrow-adbc/go/adbc" - "github.com/apache/arrow-adbc/go/driver/internal/driverbase" "github.com/apache/arrow-adbc/go/adbc/validation" + "github.com/apache/arrow-adbc/go/driver/internal/driverbase" "github.com/apache/arrow-go/v18/arrow" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/memory" From 8b98439a8614a19a2f4c76b79fbae343bf018f14 Mon Sep 17 00:00:00 2001 From: David Li Date: Mon, 7 Sep 2026 11:05:56 +0900 Subject: [PATCH 4/9] update paths --- .pre-commit-config.yaml | 4 ++-- c/driver/flightsql/CMakeLists.txt | 2 +- c/driver/flightsql/meson.build | 2 +- compose.yaml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d57d646907..8e97c47bbf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -68,8 +68,8 @@ repos: 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' + name: "lint go/driver" + entry: bash -c 'cd go/driver && 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 diff --git a/c/driver/flightsql/CMakeLists.txt b/c/driver/flightsql/CMakeLists.txt index 0725ae90c4..4d55f9dfa7 100644 --- a/c/driver/flightsql/CMakeLists.txt +++ b/c/driver/flightsql/CMakeLists.txt @@ -18,7 +18,7 @@ include(GoUtils) set(LDFLAGS "$<$:-s> $<$:-w>") -add_go_lib("${REPOSITORY_ROOT}/go/flightsql/pkg" +add_go_lib("${REPOSITORY_ROOT}/go/driver/flightsql/pkg" adbc_driver_flightsql SOURCES driver.go diff --git a/c/driver/flightsql/meson.build b/c/driver/flightsql/meson.build index 111ac9500f..ecaf75798b 100644 --- a/c/driver/flightsql/meson.build +++ b/c/driver/flightsql/meson.build @@ -37,7 +37,7 @@ adbc_driver_flightsql_lib = custom_target( golang, 'build', '-C', - meson.project_source_root() + '/../go/flightsql/pkg', + meson.project_source_root() + '/../go/driver/flightsql/pkg', '-tags=driverlib', '-buildmode=c-shared', '-o', diff --git a/compose.yaml b/compose.yaml index 882e0b4075..6cc5b7dd3b 100644 --- a/compose.yaml +++ b/compose.yaml @@ -293,7 +293,7 @@ services: oauth-server: condition: service_healthy command: >- - /bin/bash -c "cd /adbc/go/flightsql && go run ./cmd/testserver -host 0.0.0.0 -port 41414 -token-prefix oauth- -tls" + /bin/bash -c "cd /adbc/go/driver/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: @@ -317,7 +317,7 @@ services: volumes: - .:/adbc:delegated command: >- - /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" + /bin/bash -c "cd /adbc/go/driver/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 From 7f48f92e0f30905974c041fc1461e8e8d0654608 Mon Sep 17 00:00:00 2001 From: David Li Date: Mon, 7 Sep 2026 11:13:45 +0900 Subject: [PATCH 5/9] update paths --- r/adbcflightsql/configure | 2 +- r/adbcflightsql/src/Makevars.in | 2 +- r/tools/bootstrap-go.R | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/r/adbcflightsql/configure b/r/adbcflightsql/configure index b8da414454..22fd1a277b 100755 --- a/r/adbcflightsql/configure +++ b/r/adbcflightsql/configure @@ -124,7 +124,7 @@ sed \ -e "s|@nproc@|$GOMAXPROCS|" \ src/Makevars.in > src/Makevars -if [ -f "src/go/flightsql/pkg/driver.go" ]; then +if [ -f "src/go/driver/flightsql/pkg/driver.go" ]; then echo "Found vendored ADBC FlightSQL driver" exit 0 fi diff --git a/r/adbcflightsql/src/Makevars.in b/r/adbcflightsql/src/Makevars.in index 4dcceb7f1f..361a46919d 100644 --- a/r/adbcflightsql/src/Makevars.in +++ b/r/adbcflightsql/src/Makevars.in @@ -34,4 +34,4 @@ purify: $(SHLIB) rm -Rf "$(CURDIR)/go/libadbc_driver_flightsql.a" gostatic: - (cd "$(CURDIR)/go/flightsql"; GOMAXPROCS=$(GOMAXPROCS) GOPATH="$(CURDIR)/.go-path" GOCACHE="$(CURDIR)/.go-cache" GOFLAGS=-modcacherw CC="$(CGO_CC)" CXX="$(CGO_CXX)" CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(PKG_LIBS)" "@gobin@" build -v -tags driverlib -o $(CURDIR)/go/libadbc_driver_flightsql.a -buildmode=c-archive "./pkg") + (cd "$(CURDIR)/go/driver/flightsql"; GOMAXPROCS=$(GOMAXPROCS) GOPATH="$(CURDIR)/.go-path" GOCACHE="$(CURDIR)/.go-cache" GOFLAGS=-modcacherw CC="$(CGO_CC)" CXX="$(CGO_CXX)" CGO_CFLAGS="$(CGO_CFLAGS)" CGO_LDFLAGS="$(PKG_LIBS)" "@gobin@" build -v -tags driverlib -o $(CURDIR)/go/libadbc_driver_flightsql.a -buildmode=c-archive "./pkg") diff --git a/r/tools/bootstrap-go.R b/r/tools/bootstrap-go.R index e9081ca8bd..5b55b2757f 100644 --- a/r/tools/bootstrap-go.R +++ b/r/tools/bootstrap-go.R @@ -35,7 +35,7 @@ dir.create("src/arrow-adbc", showWarnings = FALSE) file.copy("../../c/include/arrow-adbc/adbc.h", "src/arrow-adbc/adbc.h") unlink("src/go/adbc", recursive = TRUE) -unlink("src/go/flightsql", recursive = TRUE) +unlink("src/go/driver", recursive = TRUE) cat( sprintf( From 6a22106b30bcf4c770d126d0f15b042d23de2d33 Mon Sep 17 00:00:00 2001 From: David Li Date: Mon, 7 Sep 2026 11:30:52 +0900 Subject: [PATCH 6/9] update more paths --- .github/workflows/native-unix.yml | 4 ++-- ci/scripts/go_build.ps1 | 6 +++--- ci/scripts/go_test.ps1 | 4 ++-- docs/source/driver/flight_sql.rst | 2 +- docs/source/driver/index.rst | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/native-unix.yml b/.github/workflows/native-unix.yml index 72a89f2e4b..f1f8cee86c 100644 --- a/.github/workflows/native-unix.yml +++ b/.github/workflows/native-unix.yml @@ -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/flightsql + pushd $(pwd)/go/driver/flightsql go build -o testserver ./cmd/testserver popd - $(pwd)/go/flightsql/testserver -host 0.0.0.0 -port 41414 & + $(pwd)/go/driver/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..." diff --git a/ci/scripts/go_build.ps1 b/ci/scripts/go_build.ps1 index af51ad2607..28948ac80a 100644 --- a/ci/scripts/go_build.ps1 +++ b/ci/scripts/go_build.ps1 @@ -22,20 +22,20 @@ $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" +$DriverDir = Join-Path $SourceDir "go" "driver" Push-Location $GoDir go build -v ./... if (-not $?) { exit 1 } Pop-Location -Push-Location $FlightSqlDir +Push-Location $DriverDir go build -v ./... if (-not $?) { exit 1 } Pop-Location if ($env:CGO_ENABLED -eq "1") { - Push-Location $FlightSqlDir + Push-Location $(Join-Path $DriverDir "flightsql") go build ` -tags driverlib ` -o adbc_driver_flightsql.dll ` diff --git a/ci/scripts/go_test.ps1 b/ci/scripts/go_test.ps1 index 8fb9b0a681..556705b3cf 100644 --- a/ci/scripts/go_test.ps1 +++ b/ci/scripts/go_test.ps1 @@ -26,14 +26,14 @@ if ($env:CGO_ENABLED -eq "1") { } $GoDir = Join-Path $SourceDir "go" "adbc" -$FlightSqlDir = Join-Path $SourceDir "go" "flightsql" +$DriverDir = Join-Path $SourceDir "go" "driver" Push-Location $GoDir go test -v ./... if (-not $?) { exit 1 } Pop-Location -Push-Location $FlightSqlDir +Push-Location $DriverDir go test -v ./... if (-not $?) { exit 1 } Pop-Location diff --git a/docs/source/driver/flight_sql.rst b/docs/source/driver/flight_sql.rst index d738385f1c..241f73a74c 100644 --- a/docs/source/driver/flight_sql.rst +++ b/docs/source/driver/flight_sql.rst @@ -81,7 +81,7 @@ the :c:struct:`AdbcDatabase`. .. tab-item:: Go :sync: go - .. recipe:: ../../../go/flightsql/example_usage_test.go + .. recipe:: ../../../go/driver/flightsql/example_usage_test.go URI Format ---------- diff --git a/docs/source/driver/index.rst b/docs/source/driver/index.rst index 8ae41fcaa6..f4d7f55907 100644 --- a/docs/source/driver/index.rst +++ b/docs/source/driver/index.rst @@ -82,7 +82,7 @@ driver in the table below is packaged this way. * - :doc:`Apache Arrow Flight SQL ` [#compat-flightsql]_ - ``flightsql`` - ASF - - :iconlink:`fa-brands fa-github|https://github.com/apache/arrow-adbc/tree/main/go/flightsql|GitHub repository` + - :iconlink:`fa-brands fa-github|https://github.com/apache/arrow-adbc/tree/main/go/driver/flightsql|GitHub repository` * - `Microsoft SQL Server `__ - ``mssql`` - Foundry From 5fee93e6ef559b19364080cfdd673170740aae41 Mon Sep 17 00:00:00 2001 From: David Li Date: Mon, 7 Sep 2026 12:06:42 +0900 Subject: [PATCH 7/9] update regenerate command --- go/adbc/pkg/Makefile | 4 ++-- go/adbc/pkg/_tmpl/driver.go.tmpl | 3 ++- go/adbc/pkg/_tmpl/utils.h.tmpl | 2 +- go/adbc/pkg/gen/main.go | 2 ++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/go/adbc/pkg/Makefile b/go/adbc/pkg/Makefile index 6449f23c57..1a07920641 100644 --- a/go/adbc/pkg/Makefile +++ b/go/adbc/pkg/Makefile @@ -52,8 +52,8 @@ libadbc_driver_%.$(SUFFIX): ../../driver/% ../../driver/%/pkg ../../driver/go.mo $(RM) $(basename $@).h regenerate: - go run gen/main.go -prefix FlightSQL -o ./flightsql/ -driver ../driver/flightsql - go run gen/main.go -prefix PanicDummy -o ./panicdummy/ -driver ../driver/panicdummy + go run gen/main.go -prefix FlightSQL -o ../../driver/flightsql/pkg -driver ../../driver/flightsql + go run gen/main.go -prefix PanicDummy -o ../../driver/panicdummy/pkg -driver ../../driver/panicdummy clean: $(RM) $(DRIVERS) diff --git a/go/adbc/pkg/_tmpl/driver.go.tmpl b/go/adbc/pkg/_tmpl/driver.go.tmpl index 673e732655..7f92b83083 100644 --- a/go/adbc/pkg/_tmpl/driver.go.tmpl +++ b/go/adbc/pkg/_tmpl/driver.go.tmpl @@ -24,7 +24,7 @@ package main // #cgo CFLAGS: -DADBC_EXPORTING // #cgo CXXFLAGS: -std=c++17 -DADBC_EXPORTING -// #include "../../drivermgr/arrow-adbc/adbc.h" +// #include "../../../adbc/drivermgr/arrow-adbc/adbc.h" // #include "utils.h" // #include // #include @@ -59,6 +59,7 @@ import ( "unsafe" "github.com/apache/arrow-adbc/go/adbc" + "github.com/apache/arrow-adbc/go/driver/{{.DriverPkg}}" "github.com/apache/arrow-go/v18/arrow/array" "github.com/apache/arrow-go/v18/arrow/cdata" "github.com/apache/arrow-go/v18/arrow/memory" diff --git a/go/adbc/pkg/_tmpl/utils.h.tmpl b/go/adbc/pkg/_tmpl/utils.h.tmpl index b8d9a039ab..3c2f268257 100644 --- a/go/adbc/pkg/_tmpl/utils.h.tmpl +++ b/go/adbc/pkg/_tmpl/utils.h.tmpl @@ -21,7 +21,7 @@ #pragma once -#include "../../drivermgr/arrow-adbc/adbc.h" +#include "../../../adbc/drivermgr/arrow-adbc/adbc.h" #include struct AdbcError* {{.Prefix}}ErrorFromArrayStream(struct ArrowArrayStream*, AdbcStatusCode*); diff --git a/go/adbc/pkg/gen/main.go b/go/adbc/pkg/gen/main.go index 5367c48803..693b9e04f9 100644 --- a/go/adbc/pkg/gen/main.go +++ b/go/adbc/pkg/gen/main.go @@ -75,6 +75,7 @@ func (p *pathSpec) IsGoFile() bool { return filepath.Ext(p.out) == ".go" } func (p *pathSpec) IsCFile() bool { return filepath.Ext(p.out) == ".c" || filepath.Ext(p.out) == ".h" } type tmplData struct { + DriverPkg string Driver string Prefix string PrefixUpper string @@ -127,6 +128,7 @@ func main() { } process(tmplData{ + DriverPkg: pkg[0].Name, Driver: pkg[0].Name + "." + *driverCtor, Prefix: *prefix, PrefixUpper: strings.ToUpper(*prefix), From 1bd6cc8e03c972650f97f09f1ef2c8094a3422e6 Mon Sep 17 00:00:00 2001 From: David Li Date: Mon, 7 Sep 2026 12:48:43 +0900 Subject: [PATCH 8/9] update licenses command --- ci/licenses/README.md | 3 +- ci/licenses/flightsql.txt | 209 +---------------------- python/adbc_driver_flightsql/LICENSE.txt | 209 +---------------------- 3 files changed, 16 insertions(+), 405 deletions(-) diff --git a/ci/licenses/README.md b/ci/licenses/README.md index 6544b76fa5..ea0dc89981 100644 --- a/ci/licenses/README.md +++ b/ci/licenses/README.md @@ -35,9 +35,10 @@ go install github.com/google/go-licenses@latest Then generate the license: ``` -cd go/adbc +cd go/driver go-licenses report ./... \ --ignore github.com/apache/arrow-adbc/go/adbc \ + --ignore github.com/apache/arrow-adbc/go/driver \ --ignore github.com/apache/arrow/go/v18 \ --template ../../ci/licenses/flightsql.tpl > ../../ci/licenses/flightsql.txt 2> /dev/null ``` diff --git a/ci/licenses/flightsql.txt b/ci/licenses/flightsql.txt index 88241bf291..7ca96b1f1b 100644 --- a/ci/licenses/flightsql.txt +++ b/ci/licenses/flightsql.txt @@ -33,6 +33,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + -------------------------------------------------------------------------------- 3rdparty dependency cloud.google.com/go/compute/metadata @@ -128,27 +129,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- -3rdparty dependency github.com/davecgh/go-spew/spew -is statically linked in certain binary distributions, like the Python wheels. -github.com/davecgh/go-spew/spew is under the ISC license. -ISC License - -Copyright (c) 2012-2016 Dave Collins - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - --------------------------------------------------------------------------------- - 3rdparty dependency github.com/go-logr/logr is statically linked in certain binary distributions, like the Python wheels. github.com/go-logr/logr is under the Apache-2.0 license. @@ -387,39 +367,6 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- - -3rdparty dependency github.com/pmezard/go-difflib/difflib -is statically linked in certain binary distributions, like the Python wheels. -github.com/pmezard/go-difflib/difflib is under the BSD-3-Clause license. -Copyright (c) 2013, Patrick Mezard -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - The names of its contributors may not be used to endorse or promote -products derived from this software without specific prior written -permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------------------- 3rdparty dependency github.com/stoewer/go-strcase @@ -449,33 +396,6 @@ SOFTWARE. -------------------------------------------------------------------------------- -3rdparty dependency github.com/stretchr/testify -is statically linked in certain binary distributions, like the Python wheels. -github.com/stretchr/testify is under the MIT license. -MIT License - -Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - --------------------------------------------------------------------------------- - 3rdparty dependency github.com/zeebo/xxh3 is statically linked in certain binary distributions, like the Python wheels. github.com/zeebo/xxh3 is under the BSD-2-Clause license. @@ -516,6 +436,12 @@ go.opentelemetry.io/auto/sdk is under the Apache-2.0 license. -------------------------------------------------------------------------------- +3rdparty dependency go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc +is statically linked in certain binary distributions, like the Python wheels. +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc is under the Apache-2.0 license. + +-------------------------------------------------------------------------------- + 3rdparty dependency go.opentelemetry.io/otel is statically linked in certain binary distributions, like the Python wheels. go.opentelemetry.io/otel is under the Apache-2.0 license. @@ -603,39 +529,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- -3rdparty dependency golang.org/x/mod/semver -is statically linked in certain binary distributions, like the Python wheels. -golang.org/x/mod/semver is under the BSD-3-Clause license. -Copyright 2009 The Go Authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google LLC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------------------- - 3rdparty dependency golang.org/x/net is statically linked in certain binary distributions, like the Python wheels. golang.org/x/net is under the BSD-3-Clause license. @@ -801,39 +694,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- -3rdparty dependency golang.org/x/tools -is statically linked in certain binary distributions, like the Python wheels. -golang.org/x/tools is under the BSD-3-Clause license. -Copyright 2009 The Go Authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google LLC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------------------- - 3rdparty dependency google.golang.org/genproto/googleapis/api/httpbody is statically linked in certain binary distributions, like the Python wheels. google.golang.org/genproto/googleapis/api/httpbody is under the Apache-2.0 license. @@ -883,58 +743,3 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- - -3rdparty dependency gopkg.in/yaml.v3 -is statically linked in certain binary distributions, like the Python wheels. -gopkg.in/yaml.v3 is under the MIT license. - -This project is covered by two different licenses: MIT and Apache. - -#### MIT License #### - -The following files were ported to Go from C files of libyaml, and thus -are still covered by their original MIT license, with the additional -copyright staring in 2011 when the project was ported over: - - apic.go emitterc.go parserc.go readerc.go scannerc.go - writerc.go yamlh.go yamlprivateh.go - -Copyright (c) 2006-2010 Kirill Simonov -Copyright (c) 2006-2011 Kirill Simonov - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -### Apache License ### - -All the remaining project files are covered by the Apache license: - -Copyright (c) 2011-2019 Canonical Ltd - -Licensed 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. diff --git a/python/adbc_driver_flightsql/LICENSE.txt b/python/adbc_driver_flightsql/LICENSE.txt index 234146c77c..17f4118a87 100644 --- a/python/adbc_driver_flightsql/LICENSE.txt +++ b/python/adbc_driver_flightsql/LICENSE.txt @@ -357,6 +357,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + -------------------------------------------------------------------------------- 3rdparty dependency cloud.google.com/go/compute/metadata @@ -452,27 +453,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- -3rdparty dependency github.com/davecgh/go-spew/spew -is statically linked in certain binary distributions, like the Python wheels. -github.com/davecgh/go-spew/spew is under the ISC license. -ISC License - -Copyright (c) 2012-2016 Dave Collins - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - --------------------------------------------------------------------------------- - 3rdparty dependency github.com/go-logr/logr is statically linked in certain binary distributions, like the Python wheels. github.com/go-logr/logr is under the Apache-2.0 license. @@ -711,39 +691,6 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- - -3rdparty dependency github.com/pmezard/go-difflib/difflib -is statically linked in certain binary distributions, like the Python wheels. -github.com/pmezard/go-difflib/difflib is under the BSD-3-Clause license. -Copyright (c) 2013, Patrick Mezard -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - The names of its contributors may not be used to endorse or promote -products derived from this software without specific prior written -permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -------------------------------------------------------------------------------- 3rdparty dependency github.com/stoewer/go-strcase @@ -773,33 +720,6 @@ SOFTWARE. -------------------------------------------------------------------------------- -3rdparty dependency github.com/stretchr/testify -is statically linked in certain binary distributions, like the Python wheels. -github.com/stretchr/testify is under the MIT license. -MIT License - -Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - --------------------------------------------------------------------------------- - 3rdparty dependency github.com/zeebo/xxh3 is statically linked in certain binary distributions, like the Python wheels. github.com/zeebo/xxh3 is under the BSD-2-Clause license. @@ -840,6 +760,12 @@ go.opentelemetry.io/auto/sdk is under the Apache-2.0 license. -------------------------------------------------------------------------------- +3rdparty dependency go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc +is statically linked in certain binary distributions, like the Python wheels. +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc is under the Apache-2.0 license. + +-------------------------------------------------------------------------------- + 3rdparty dependency go.opentelemetry.io/otel is statically linked in certain binary distributions, like the Python wheels. go.opentelemetry.io/otel is under the Apache-2.0 license. @@ -927,39 +853,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- -3rdparty dependency golang.org/x/mod/semver -is statically linked in certain binary distributions, like the Python wheels. -golang.org/x/mod/semver is under the BSD-3-Clause license. -Copyright 2009 The Go Authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google LLC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------------------- - 3rdparty dependency golang.org/x/net is statically linked in certain binary distributions, like the Python wheels. golang.org/x/net is under the BSD-3-Clause license. @@ -1125,39 +1018,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- -3rdparty dependency golang.org/x/tools -is statically linked in certain binary distributions, like the Python wheels. -golang.org/x/tools is under the BSD-3-Clause license. -Copyright 2009 The Go Authors. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google LLC nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - --------------------------------------------------------------------------------- - 3rdparty dependency google.golang.org/genproto/googleapis/api/httpbody is statically linked in certain binary distributions, like the Python wheels. google.golang.org/genproto/googleapis/api/httpbody is under the Apache-2.0 license. @@ -1207,58 +1067,3 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------- - -3rdparty dependency gopkg.in/yaml.v3 -is statically linked in certain binary distributions, like the Python wheels. -gopkg.in/yaml.v3 is under the MIT license. - -This project is covered by two different licenses: MIT and Apache. - -#### MIT License #### - -The following files were ported to Go from C files of libyaml, and thus -are still covered by their original MIT license, with the additional -copyright staring in 2011 when the project was ported over: - - apic.go emitterc.go parserc.go readerc.go scannerc.go - writerc.go yamlh.go yamlprivateh.go - -Copyright (c) 2006-2010 Kirill Simonov -Copyright (c) 2006-2011 Kirill Simonov - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - -### Apache License ### - -All the remaining project files are covered by the Apache license: - -Copyright (c) 2011-2019 Canonical Ltd - -Licensed 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. From 3e342dd795d2d1761fe1be736d2874bbb04f858d Mon Sep 17 00:00:00 2001 From: David Li Date: Mon, 7 Sep 2026 12:54:06 +0900 Subject: [PATCH 9/9] lint --- ci/licenses/flightsql.txt | 1 - python/adbc_driver_flightsql/LICENSE.txt | 1 - 2 files changed, 2 deletions(-) diff --git a/ci/licenses/flightsql.txt b/ci/licenses/flightsql.txt index 7ca96b1f1b..4a7fced164 100644 --- a/ci/licenses/flightsql.txt +++ b/ci/licenses/flightsql.txt @@ -742,4 +742,3 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/python/adbc_driver_flightsql/LICENSE.txt b/python/adbc_driver_flightsql/LICENSE.txt index 17f4118a87..bd823551fd 100644 --- a/python/adbc_driver_flightsql/LICENSE.txt +++ b/python/adbc_driver_flightsql/LICENSE.txt @@ -1066,4 +1066,3 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -