Skip to content

Commit

Permalink
fix(snowflake): resolve import error from interval datatype refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
kszucs committed Jun 14, 2023
1 parent ab35311 commit 3092012
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions ibis/backends/snowflake/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

import pyarrow as pa
import sqlalchemy as sa
import sqlalchemy.types as sat
from snowflake.connector.constants import FIELD_ID_TO_NAME
from snowflake.sqlalchemy import ARRAY, OBJECT, URL

Expand Down Expand Up @@ -341,8 +342,6 @@ def list_databases(self, like=None) -> list[str]:
def _register_in_memory_table(self, op: ops.InMemoryTable) -> None:
import pyarrow.parquet as pq

from ibis.backends.snowflake.datatypes import dtype_to_snowflake

dialect = self.con.dialect
quote = dialect.preparer(dialect).quote_identifier
raw_name = op.name
Expand Down Expand Up @@ -385,7 +384,7 @@ def _register_in_memory_table(self, op: ops.InMemoryTable) -> None:
schema = ", ".join(
"{name} {typ}".format(
name=quote(col),
typ=sa.types.to_instance(dtype_to_snowflake(typ)).compile(
typ=sat.to_instance(SnowflakeType.from_ibis(typ)).compile(
dialect=dialect
),
)
Expand Down

0 comments on commit 3092012

Please sign in to comment.