Skip to content

Commit

Permalink
fix(go/adbc/driver/snowflake): fixed GetTableSchema missing field in …
Browse files Browse the repository at this point in the history
…rows Scan
  • Loading branch information
ryan-syed committed Mar 15, 2024
1 parent 8596879 commit 10d8eea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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++]
Expand All @@ -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'
Expand All @@ -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]
Expand Down
9 changes: 4 additions & 5 deletions go/adbc/driver/snowflake/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 10d8eea

Please sign in to comment.