You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "frbvianna (via GitHub)" <gi...@apache.org> on 2025/08/18 17:07:40 UTC
[I] go/adbc/driver/snowflake: missing xdbc_column_size for binary columns in GetObjects [arrow-adbc]
frbvianna opened a new issue, #3300:
URL: https://github.com/apache/arrow-adbc/issues/3300
### What happened?
While executing the GetObjects call at ObjectDepthColumns, the column sizes are not returned for binary-type columns:
```go
rr, err := cnxn.GetObjects(ctx, adbc.ObjectDepthColumns, &catalog, &schema, &table, nil, nil)
```
Returns the record:
```
record:
schema:
fields: 2
- catalog_name: type=utf8, nullable
- catalog_db_schemas: type=list<item: struct<db_schema_name: utf8, db_schema_tables: list<item: struct<table_name: utf8, table_type: utf8, table_columns: list<item: struct<column_name: utf8, ordinal_position: int32, remarks: utf8, xdbc_data_type: int16, xdbc_type_name: utf8, xdbc_column_size: int32, xdbc_decimal_digits: int16, xdbc_num_prec_radix: int16, xdbc_nullable: int16, xdbc_column_def: utf8, xdbc_sql_data_type: int16, xdbc_datetime_sub: int16, xdbc_char_octet_length: int32, xdbc_is_nullable: utf8, xdbc_scope_catalog: utf8, xdbc_scope_schema: utf8, xdbc_scope_table: utf8, xdbc_is_autoincrement: bool, xdbc_is_generatedcolumn: bool>, nullable>, table_constraints: list<item: struct<constraint_name: utf8, constraint_type: utf8, constraint_column_names: list<item: utf8, nullable>, constraint_column_usage: list<item: struct<fk_catalog: utf8, fk_db_schema: utf8, fk_table: utf8, fk_column_name: utf8>, nullable>>, nullable>>, nullable>>, nullable>, nullable
rows: 1
col[0][catalog_name]: ["<DB>"]
col[1][catalog_db_schemas]: [{["<SCHEMA>"] [{["BINARY_COLUMNS"] ["BASE TABLE"] [{["COL_BINARY" "COL_BINARY_N"] [1 2] [(null) (null)] [14 14] ["BINARY" "BINARY"] [(null) (null)] [(null) (null)] [(null) (null)] [1 1] [(null) (null)] [-2 -2] [(null) (null)] [(null) (null)] ["YES" "YES"] [(null) (null)] [(null) (null)] [(null) (null)] [(null) (null)] [(null) (null)]}] [{[] [] [] []}]}]}]
```
This looks to be due to Snowflake's INFORMATION_SCHEMA.COLUMNS lacking this info — neither CHARACTER_MAXIMUM_LENGTH nor CHARACTER_OCTET_LENGTH columns are populated. Maybe this is expected because the BINARY types do not store "characters" but "bytes"; however, there's no other column storing the byte length in that view.
Looks like the info is available via the `SHOW COLUMNS` statement instead:
`SHOW COLUMNS IN TABLE TEST_SCHEMA.BINARY_COLUMNS`
table_name | schema_name | column_name | data_type | null? | default | kind | expression | comment | database_name | autoincrement | schema_evolution_record
-- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | --
BINARY_COLUMNS | redacted | COL_BINARY | {"type":"BINARY","length":8388608,"byteLength":8388608,"nullable":true,"fixed":true} | true | | COLUMN | | | redacted | |
BINARY_COLUMNS | redacted | COL_BINARY_N | {"type":"BINARY","length":10,"byteLength":10,"nullable":true,"fixed":true} | true | | COLUMN | | | redacted | |
### Stack Trace
_No response_
### How can we reproduce the bug?
Example table:
```sql
CREATE TABLE "TEST_SCHEMA"."BINARY_COLUMNS" (
COL_BINARY BINARY,
COL_BINARY_N BINARY(10)
);
```
### Environment/Setup
github.com/apache/arrow-adbc/go/adbc v1.6.0
macOS 15.5
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] go/adbc/driver/snowflake: missing xdbc_column_size for binary columns in GetObjects [arrow-adbc]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba closed issue #3300: go/adbc/driver/snowflake: missing xdbc_column_size for binary columns in GetObjects
URL: https://github.com/apache/arrow-adbc/issues/3300
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] go/adbc/driver/snowflake: missing xdbc_column_size for binary columns in GetObjects [arrow-adbc]
Posted by "amoeba (via GitHub)" <gi...@apache.org>.
amoeba commented on issue #3300:
URL: https://github.com/apache/arrow-adbc/issues/3300#issuecomment-4510553273
Hi @frbvianna, since active development of the Go Snowflake ADBC driver has moved to https://github.com/adbc-drivers/snowflake, I duplicate this issue over there was https://github.com/adbc-drivers/snowflake/issues/127. I'm going to close this so we don't have two copies.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org