Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-1871582: Array support broken in 1.7.2 #567

Open
jochenott opened this issue Jan 3, 2025 · 1 comment
Open

SNOW-1871582: Array support broken in 1.7.2 #567

jochenott opened this issue Jan 3, 2025 · 1 comment
Labels
bug Something isn't working status-triage_done Initial triage done, will be further handled by the driver team

Comments

@jochenott
Copy link

  1. What version of Python are you using? 3.12

  2. What operating system and processor architecture are you using? osx-arm64

  3. What are the component versions in the environment (pip freeze)?
    snowflake-sqlalchemy 1.7.2 and sqlalchemy 1.X

  4. What did you do? Compile a "create table" statement for a table that contains a column with "array" type.

  5. What did you expect to see? No exception. Instead, there was an exception.

To reproduce:

from snowflake.sqlalchemy.snowdialect import SnowflakeDialect
import sqlalchemy as sa

dialect = SnowflakeDialect()

table = sa.Table(
    "table",
    sa.MetaData(),
    sa.Column(
        "array_str_column",
        sa.ARRAY(sa.String),
    ),
)
create_table = sa.sql.ddl.CreateTable(table)
print(str(create_table.compile(dialect=dialect)))

This worked for snowflake-sqlalchemy 1.7.1 without raising an exception.

For snowflake-sqlalchemy 1.7.2, this results in an exception AttributeError: 'ARRAY' object has no attribute 'is_semi_structured' pointing to this line as the culprit of the attribute error:

if type_.is_semi_structured:

This code was introduced in #560 .

@jochenott jochenott added bug Something isn't working needs triage labels Jan 3, 2025
@sfc-gh-dszmolka sfc-gh-dszmolka added status-triage_done Initial triage done, will be further handled by the driver team and removed needs triage labels Jan 3, 2025
@sfc-gh-dszmolka sfc-gh-dszmolka changed the title Array support broken SNOW-1871582: Array support broken in 1.7.2 Jan 3, 2025
@sfc-gh-dszmolka
Copy link
Contributor

hi - thank you for raising this issue with us. We regret seeing how much issues you have with this library and will work on rectifying it. The issue is now with the dev team who will take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

No branches or pull requests

2 participants