From 10d8eea621cb4064a09835dc16e52fba372a2aa3 Mon Sep 17 00:00:00 2001 From: Ryan Syed Date: Fri, 15 Mar 2024 10:01:25 -0700 Subject: [PATCH] fix(go/adbc/driver/snowflake): fixed GetTableSchema missing field in rows Scan --- .pre-commit-config.yaml | 12 ++++++------ go/adbc/driver/snowflake/connection.go | 9 ++++----- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fb3a19cdae..c2b1eb2706 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.3.0 + rev: v4.5.0 hooks: - id: check-xml - id: check-yaml @@ -40,7 +40,7 @@ repos: - id: trailing-whitespace exclude: "^r/.*?/_snaps/.*?.md$" - repo: https://github.com/pre-commit/mirrors-clang-format - rev: "v14.0.6" + rev: "v18.1.1" hooks: - id: clang-format types_or: [c, c++] @@ -59,7 +59,7 @@ repos: - "--linelength=90" - "--verbose=2" - repo: https://github.com/golangci/golangci-lint - rev: v1.49.0 + rev: v1.56.2 hooks: - id: golangci-lint entry: bash -c 'cd go/adbc && golangci-lint run --fix --timeout 5m' @@ -72,17 +72,17 @@ repos: args: [--autofix] types_or: [java] - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 24.2.0 hooks: - id: black types_or: [pyi, python] - repo: https://github.com/PyCQA/flake8 - rev: 4.0.1 + rev: 7.0.0 hooks: - id: flake8 types_or: [python] - repo: https://github.com/PyCQA/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort types_or: [python] diff --git a/go/adbc/driver/snowflake/connection.go b/go/adbc/driver/snowflake/connection.go index 5855c875ec..b063e38ca0 100644 --- a/go/adbc/driver/snowflake/connection.go +++ b/go/adbc/driver/snowflake/connection.go @@ -408,7 +408,6 @@ func toField(name string, isnullable bool, dataType string, numPrec, numPrecRadi } func toXdbcDataType(dt arrow.DataType) (xdbcType internal.XdbcDataType) { - xdbcType = internal.XdbcDataType_XDBC_UNKNOWN_TYPE switch dt.ID() { case arrow.EXTENSION: return toXdbcDataType(dt.(arrow.ExtensionType).StorageType()) @@ -968,14 +967,14 @@ func (c *cnxn) GetTableSchema(ctx context.Context, catalog *string, dbSchema *st defer rows.Close() var ( - name, typ, kind, isnull, primary, unique string - def, check, expr, comment, policyName sql.NullString - fields = []arrow.Field{} + name, typ, kind, isnull, primary, unique string + def, check, expr, comment, policyName, privacyDomain sql.NullString + fields = []arrow.Field{} ) for rows.Next() { err := rows.Scan(&name, &typ, &kind, &isnull, &def, &primary, &unique, - &check, &expr, &comment, &policyName) + &check, &expr, &comment, &policyName, &privacyDomain) if err != nil { return nil, errToAdbcErr(adbc.StatusIO, err) }