Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dev/birschick-bq/data…
Browse files Browse the repository at this point in the history
…-type-conv-scalar
  • Loading branch information
birschick-bq committed Sep 19, 2024
2 parents 0ba07c6 + 42e5063 commit 2708aeb
Show file tree
Hide file tree
Showing 10 changed files with 93 additions and 90 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ MANYLINUX=2014
MAVEN=3.6.3
PLATFORM=linux/amd64
PYTHON=3.9
GO=1.21.8
GO=1.22.4
ARROW_MAJOR_VERSION=14
DOTNET=8.0

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['8', '11', '17', '21']
java: ['8', '11', '17', '21', '22']
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -69,7 +69,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: ['11', '17', '21']
java: ['17', '21']
steps:
- uses: actions/checkout@v4
with:
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ repos:
- "--linelength=90"
- "--verbose=2"
- repo: https://github.com/golangci/golangci-lint
rev: v1.59.1
rev: v1.61.0
hooks:
- id: golangci-lint
entry: bash -c 'cd go/adbc && golangci-lint run --fix --timeout 5m'
types_or: [go]
types_or: [go, go-mod]
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.13.0
hooks:
Expand Down Expand Up @@ -102,7 +102,7 @@ repos:
pass_filenames: false
entry: "./ci/scripts/run_rat_local.sh"
- id: check-cgo-adbc-header
name: Ensure CGO adbc.h is sync'd
name: Ensure CGO adbc.h is syncd
language: script
pass_filenames: true
files: '(c/driver_manager/adbc_driver_manager\.)|(^adbc\.h)'
Expand Down
10 changes: 8 additions & 2 deletions csharp/src/Drivers/Apache/Spark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ but can also be passed in the call to `AdbcDatabase.Connect`.

| Property | Description | Default |
| :--- | :--- | :--- |
| `adbc.spark.type` | (Required) Indicates the Spark server type. One of `databricks`, `http` (future: `standard`, `hdinsight`) | |
| `adbc.spark.type` | (Required) Indicates the Spark server type. One of `databricks`, `http` (future: `standard`) | |
| `adbc.spark.auth_type` | An indicator of the intended type of authentication. Allowed values: `none`, `username_only`, `basic`, and `token`. This property is optional. The authentication type can be inferred from `token`, `username`, and `password`. If a `token` value is provided, token authentication is used. Otherwise, if both `username` and `password` values are provided, basic authentication is used. | |
| `adbc.spark.host` | Host name for the data source. Do not include scheme or port number. Example: `sparkserver.region.cloudapp.azure.com` | |
| `adbc.spark.port` | The port number the data source listens on for a new connections. | `443` |
Expand Down Expand Up @@ -120,4 +120,10 @@ This is currently unsupported.

### Azure Spark HDInsight

This is currently unsupported.
To read data from Azure HDInsight Spark Cluster, use the following parameters:
adbc.spark.type = "http"
adbc.spark.port = "443"
adbc.spark.path = "/sparkhive2"
adbc.spark.host = $"{clusterHostName}"
username = $"{clusterUserName}"
password = $"{clusterPassword}"
5 changes: 0 additions & 5 deletions csharp/src/Drivers/Apache/Spark/SparkParameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ public static class SparkServerTypeConstants
public const string Http = "http";
public const string Databricks = "databricks";
public const string Standard = "standard";
public const string HDInsight = "hdinsight";
internal const string SupportedList = Http + ", " + Databricks;

public static bool TryParse(string? serverType, out SparkServerType serverTypeValue)
Expand All @@ -102,9 +101,6 @@ public static bool TryParse(string? serverType, out SparkServerType serverTypeVa
case Standard:
serverTypeValue = SparkServerType.Standard;
return true;
case HDInsight:
serverTypeValue = SparkServerType.HDInsight;
return true;
default:
serverTypeValue = SparkServerType.Invalid;
return false;
Expand All @@ -118,7 +114,6 @@ public enum SparkServerType
Http,
Databricks,
Standard,
HDInsight,
Empty = int.MaxValue,
}
}
1 change: 0 additions & 1 deletion csharp/test/Drivers/Apache/Spark/SparkConnectionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public InvalidConnectionParametersTestData()
Add(new(new() { [SparkParameters.Type] = " " }, typeof(ArgumentException)));
Add(new(new() { [SparkParameters.Type] = "xxx" }, typeof(ArgumentOutOfRangeException)));
Add(new(new() { [SparkParameters.Type] = SparkServerTypeConstants.Standard }, typeof(ArgumentOutOfRangeException)));
Add(new(new() { [SparkParameters.Type] = SparkServerTypeConstants.HDInsight }, typeof(ArgumentOutOfRangeException)));
Add(new(new() { [SparkParameters.Type] = SparkServerTypeConstants.Http, [SparkParameters.HostName] = " " }, typeof(ArgumentException)));
Add(new(new() { [SparkParameters.Type] = SparkServerTypeConstants.Http, [SparkParameters.HostName] = "invalid!server.com" }, typeof(ArgumentException)));
Add(new(new() { [SparkParameters.Type] = SparkServerTypeConstants.Http, [SparkParameters.HostName] = "http://valid.server.com" }, typeof(ArgumentException)));
Expand Down
8 changes: 4 additions & 4 deletions go/adbc/driver/flightsql/flightsql_adbc_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -585,12 +585,12 @@ func (srv *IncrementalPollTestServer) PollFlightInfo(ctx context.Context, desc *
if query.query == "unavailable" {
testCase = unavailableCase
} else {
return nil, status.Errorf(codes.Unimplemented, fmt.Sprintf("Invalid case %s", query.query))
return nil, status.Errorf(codes.Unimplemented, "Invalid case %s", query.query)
}
}

if testCase.differentRetryDescriptor && progress != int64(query.nextIndex) {
return nil, status.Errorf(codes.InvalidArgument, fmt.Sprintf("Used wrong retry descriptor, expected %d but got %d", query.nextIndex, progress))
return nil, status.Errorf(codes.InvalidArgument, "Used wrong retry descriptor, expected %d but got %d", query.nextIndex, progress)
}

if query.unavailable {
Expand Down Expand Up @@ -645,7 +645,7 @@ func (srv *IncrementalPollTestServer) PollFlightInfoStatement(ctx context.Contex

testCase, ok := srv.testCases[query.GetQuery()]
if !ok {
return nil, status.Errorf(codes.Unimplemented, fmt.Sprintf("Invalid case %s", query.GetQuery()))
return nil, status.Errorf(codes.Unimplemented, "Invalid case %s", query.GetQuery())
}

srv.queries[queryId] = &IncrementalQuery{
Expand All @@ -662,7 +662,7 @@ func (srv *IncrementalPollTestServer) PollFlightInfoPreparedStatement(ctx contex

testCase, ok := srv.testCases[req]
if !ok {
return nil, status.Errorf(codes.Unimplemented, fmt.Sprintf("Invalid case %s", req))
return nil, status.Errorf(codes.Unimplemented, "Invalid case %s", req)
}

srv.mu.Lock()
Expand Down
47 changes: 25 additions & 22 deletions go/adbc/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@

module github.com/apache/arrow-adbc/go/adbc

go 1.21
go 1.22.0

// TODO(https://github.com/apache/arrow-adbc/issues/2021): unpin go
toolchain go1.22.4

require (
cloud.google.com/go/bigquery v1.62.0
Expand All @@ -29,20 +32,20 @@ require (
github.com/stretchr/testify v1.9.0
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa
golang.org/x/oauth2 v0.22.0
golang.org/x/oauth2 v0.23.0
golang.org/x/sync v0.8.0
golang.org/x/tools v0.24.0
google.golang.org/api v0.195.0
google.golang.org/grpc v1.66.1
golang.org/x/tools v0.25.0
google.golang.org/api v0.197.0
google.golang.org/grpc v1.66.2
google.golang.org/protobuf v1.34.2
)

require (
cloud.google.com/go v0.115.1 // indirect
cloud.google.com/go/auth v0.9.1 // indirect
cloud.google.com/go/auth v0.9.3 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect
cloud.google.com/go/compute/metadata v0.5.0 // indirect
cloud.google.com/go/iam v1.1.13 // indirect
cloud.google.com/go/iam v1.2.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/99designs/keyring v1.2.2 // indirect
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0 // indirect
Expand Down Expand Up @@ -80,7 +83,7 @@ require (
github.com/golang/snappy v0.0.4 // indirect
github.com/google/flatbuffers v24.3.25+incompatible // indirect
github.com/google/s2a-go v0.1.8 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect
github.com/googleapis/gax-go/v2 v2.13.0 // indirect
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
Expand All @@ -100,22 +103,22 @@ require (
github.com/stretchr/objx v0.5.2 // indirect
github.com/zeebo/xxh3 v1.0.2 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.49.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/sys v0.24.0 // indirect
golang.org/x/term v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect
go.opentelemetry.io/otel v1.29.0 // indirect
go.opentelemetry.io/otel/metric v1.29.0 // indirect
go.opentelemetry.io/otel/trace v1.29.0 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/term v0.24.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/time v0.6.0 // indirect
golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 // indirect
google.golang.org/genproto v0.0.0-20240823204242-4ba0660f739c // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240823204242-4ba0660f739c // indirect
google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
modernc.org/gc/v3 v3.0.0-20240304020402-f0dba7c97c2b // indirect
modernc.org/libc v1.45.3 // indirect
Expand Down
Loading

0 comments on commit 2708aeb

Please sign in to comment.