Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions .github/workflows/dev_issues.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,22 @@
# This file has been modified from its original version, which is
# under the Apache License:
#
# 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
# 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
# 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.
# 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.

name: Issues Bot

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/dev_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
pr_standard:
name: "Check PR"
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'

steps:
- name: Check PR title format
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/generate.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright (c) 2025 ADBC Drivers Contributors
#
# 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.

driver = "databricks"

[lang]
go = "true"
42 changes: 29 additions & 13 deletions .github/workflows/go_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,22 @@ defaults:

jobs:
test:
name: "Test/${{ matrix.os }} ${{ matrix.arch }}"
name: "Test/${{ matrix.platform }}_${{ matrix.arch }}"
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: true
matrix:
include:
- { os: Linux, platform: linux, arch: amd64, runner: ubuntu-latest }
- { os: macOS, platform: macos, arch: arm64, runner: macos-latest }
- { os: Windows, platform: win, arch: amd64, runner: windows-latest }
- { platform: linux, arch: amd64, runner: ubuntu-latest }
- { platform: macos, arch: arm64, runner: macos-latest }
- { platform: win, arch: amd64, runner: windows-latest }
permissions:
contents: read
steps:
- name: free up disk space
if: runner.os != 'Windows'
run: |
# Rust uses a lot of disk space, free up some space
# Preinstalled tools use a lot of disk space, free up some space
# https://github.com/actions/runner-images/issues/2840
sudo rm -rf "$AGENT_TOOLSDIRECTORY"

Expand Down Expand Up @@ -147,21 +147,21 @@ jobs:
go test -tags assert -v ./...

validate:
name: "Validate/${{ matrix.os }} ${{ matrix.arch }}"
name: "Validate/${{ matrix.platform }}_${{ matrix.arch }}"
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: true
matrix:
include:
# I think we only need to test one platform, but we can change that later
- { os: Linux, platform: linux, arch: amd64, runner: ubuntu-latest }
- { platform: linux, arch: amd64, runner: ubuntu-latest }
permissions:
contents: read
steps:
- name: free up disk space
if: runner.os != 'Windows'
run: |
# Rust uses a lot of disk space, free up some space
# Preinstalled tools use a lot of disk space, free up some space
# https://github.com/actions/runner-images/issues/2840
sudo rm -rf "$AGENT_TOOLSDIRECTORY"

Expand All @@ -185,6 +185,14 @@ jobs:
- name: Build Library
working-directory: go
run: |
if [[ -f ci/scripts/pre-build.sh ]]; then
./ci/scripts/pre-build.sh test ${{ matrix.platform }} ${{ matrix.arch }}
fi
set -a
if [[ -f .env.release ]]; then
source .env.test
fi
set +a
pixi run adbc-make build DEBUG=true VERBOSE=true DRIVER=databricks

- name: Start Test Dependencies
Expand Down Expand Up @@ -244,17 +252,17 @@ jobs:
retention-days: 2

build:
name: "Build databricks/${{ matrix.os }} ${{ matrix.arch }}"
name: "Build databricks/${{ matrix.platform }}_${{ matrix.arch }}"
needs: test
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: true
matrix:
include:
- { os: Linux, platform: linux, arch: amd64, runner: ubuntu-latest }
- { os: Linux, platform: linux, arch: arm64, runner: ubuntu-24.04-arm }
- { os: macOS, platform: macos, arch: arm64, runner: macos-latest }
- { os: Windows, platform: windows, arch: amd64, runner: windows-latest }
- { platform: linux, arch: amd64, runner: ubuntu-latest }
- { platform: linux, arch: arm64, runner: ubuntu-24.04-arm }
- { platform: macos, arch: arm64, runner: macos-latest }
- { platform: windows, arch: amd64, runner: windows-latest }
permissions:
contents: read
packages: read
Expand Down Expand Up @@ -289,6 +297,14 @@ jobs:
- name: Build Library
working-directory: go
run: |
if [[ -f ci/scripts/pre-build.sh ]]; then
./ci/scripts/pre-build.sh release ${{ matrix.platform }} ${{ matrix.arch }}
fi
set -a
if [[ -f .env.release ]]; then
source .env.release
fi
set +a
pixi run adbc-make check CI=true VERBOSE=true DRIVER=databricks

- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
Expand Down
42 changes: 29 additions & 13 deletions .github/workflows/go_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,22 @@ defaults:

jobs:
test:
name: "Test/${{ matrix.os }} ${{ matrix.arch }}"
name: "Test/${{ matrix.platform }}_${{ matrix.arch }}"
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: true
matrix:
include:
- { os: Linux, platform: linux, arch: amd64, runner: ubuntu-latest }
- { os: macOS, platform: macos, arch: arm64, runner: macos-latest }
- { os: Windows, platform: win, arch: amd64, runner: windows-latest }
- { platform: linux, arch: amd64, runner: ubuntu-latest }
- { platform: macos, arch: arm64, runner: macos-latest }
- { platform: win, arch: amd64, runner: windows-latest }
permissions:
contents: read
steps:
- name: free up disk space
if: runner.os != 'Windows'
run: |
# Rust uses a lot of disk space, free up some space
# Preinstalled tools use a lot of disk space, free up some space
# https://github.com/actions/runner-images/issues/2840
sudo rm -rf "$AGENT_TOOLSDIRECTORY"

Expand Down Expand Up @@ -151,21 +151,21 @@ jobs:
go test -tags assert -v ./...

validate:
name: "Validate/${{ matrix.os }} ${{ matrix.arch }}"
name: "Validate/${{ matrix.platform }}_${{ matrix.arch }}"
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: true
matrix:
include:
# I think we only need to test one platform, but we can change that later
- { os: Linux, platform: linux, arch: amd64, runner: ubuntu-latest }
- { platform: linux, arch: amd64, runner: ubuntu-latest }
permissions:
contents: read
steps:
- name: free up disk space
if: runner.os != 'Windows'
run: |
# Rust uses a lot of disk space, free up some space
# Preinstalled tools use a lot of disk space, free up some space
# https://github.com/actions/runner-images/issues/2840
sudo rm -rf "$AGENT_TOOLSDIRECTORY"

Expand All @@ -189,6 +189,14 @@ jobs:
- name: Build Library
working-directory: go
run: |
if [[ -f ci/scripts/pre-build.sh ]]; then
./ci/scripts/pre-build.sh test ${{ matrix.platform }} ${{ matrix.arch }}
fi
set -a
if [[ -f .env.release ]]; then
source .env.test
fi
set +a
pixi run adbc-make build DEBUG=true VERBOSE=true DRIVER=databricks

- name: Start Test Dependencies
Expand Down Expand Up @@ -248,17 +256,17 @@ jobs:
retention-days: 2

build:
name: "Build databricks/${{ matrix.os }} ${{ matrix.arch }}"
name: "Build databricks/${{ matrix.platform }}_${{ matrix.arch }}"
needs: test
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: true
matrix:
include:
- { os: Linux, platform: linux, arch: amd64, runner: ubuntu-latest }
- { os: Linux, platform: linux, arch: arm64, runner: ubuntu-24.04-arm }
- { os: macOS, platform: macos, arch: arm64, runner: macos-latest }
- { os: Windows, platform: windows, arch: amd64, runner: windows-latest }
- { platform: linux, arch: amd64, runner: ubuntu-latest }
- { platform: linux, arch: arm64, runner: ubuntu-24.04-arm }
- { platform: macos, arch: arm64, runner: macos-latest }
- { platform: windows, arch: amd64, runner: windows-latest }
permissions:
contents: read
packages: read
Expand Down Expand Up @@ -293,6 +301,14 @@ jobs:
- name: Build Library
working-directory: go
run: |
if [[ -f ci/scripts/pre-build.sh ]]; then
./ci/scripts/pre-build.sh release ${{ matrix.platform }} ${{ matrix.arch }}
fi
set -a
if [[ -f .env.release ]]; then
source .env.release
fi
set +a
pixi run adbc-make check CI=true VERBOSE=true DRIVER=databricks

- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
Expand Down
1 change: 1 addition & 0 deletions .rat-apache
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

.github/workflows/csharp.yml
.github/workflows/dev_issues.yaml
ci/scripts/csharp_build.sh
ci/scripts/csharp_test.sh
csharp/Benchmarks/CloudFetchBenchmarkRunner.cs
Expand Down
4 changes: 4 additions & 0 deletions .rat-excludes
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ test-infrastructure/proxy-server/go.sum
go/go.sum
go/pixi.lock
go/validation/tests/.gitkeep
go/validation/queries/ingest/.gitkeep
go/validation/queries/type/bind/.gitkeep
go/validation/queries/type/literal/.gitkeep
go/validation/queries/type/select/.gitkeep
# adbc.h is vendored
go/pkg/adbc.h
test-infrastructure/proxy-server/generated/**
15 changes: 15 additions & 0 deletions go/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (c) 2025 ADBC Drivers Contributors
#
# 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.

generated
11 changes: 11 additions & 0 deletions go/driver.go
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't we just hardcode the driver name? (We can let Mandy fix this later.)

Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,13 @@ const (
)

var (
InfoDriverName string
infoVendorVersion string
)

func init() {
InfoDriverName = "ADBC Driver Foundry Driver for Databricks"

if info, ok := debug.ReadBuildInfo(); ok {
for _, dep := range info.Deps {
switch dep.Path {
Expand All @@ -94,6 +97,14 @@ type driverImpl struct {
// NewDriver creates a new Databricks driver using the given Arrow allocator.
func NewDriver(alloc memory.Allocator) adbc.Driver {
info := driverbase.DefaultDriverInfo("Databricks")

// Override driver name
if InfoDriverName != "" {
if err := info.RegisterInfoCode(adbc.InfoDriverName, InfoDriverName); err != nil {
panic(err)
}
}

if infoVendorVersion != "" {
if err := info.RegisterInfoCode(adbc.InfoVendorVersion, infoVendorVersion); err != nil {
panic(err)
Expand Down
2 changes: 1 addition & 1 deletion go/driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ func (d *DatabricksQuirks) DBSchema() string { return
func (d *DatabricksQuirks) GetMetadata(code adbc.InfoCode) interface{} {
switch code {
case adbc.InfoDriverName:
return "ADBC Databricks Driver - Go"
return "ADBC Driver Foundry Driver for Databricks"
case adbc.InfoDriverVersion:
return "(unknown or development build)"
case adbc.InfoDriverArrowVersion:
Expand Down
3 changes: 3 additions & 0 deletions go/pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# !!!! AUTO-GENERATED FILE. DO NOT EDIT. !!!!
# USE adbc-gen-workflow (see adbc-drivers/dev) TO UPDATE THIS FILE.

[workspace]
authors = ["ADBC Drivers Contributors"]
channels = ["conda-forge"]
Expand Down
2 changes: 1 addition & 1 deletion go/pkg/driver.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions go/validation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!--
Copyright (c) 2025 ADBC Drivers Contributors

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.
-->

# Validation Suite Setup

1. Set the following environment variables:

```shell
export DATABRICKS_HOST=""
export DATABRICKS_ACCESSTOKEN=""
export DATABRICKS_HTTPPATH=""
export DATABRICKS_CATALOG=""
export DATABRICKS_SCHEMA=""
```

2. Run the tests:

```shell
pixi run validate
```
Loading
Loading