Skip to content

Commit

Permalink
fix(sqlalchemy): add support for sqlalchemy string subclassed types
Browse files Browse the repository at this point in the history
  • Loading branch information
gforsyth authored and cpcloud committed Jul 21, 2023
1 parent c1182be commit 8b33b35
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ibis/backends/base/sql/alchemy/datatypes.py
Expand Up @@ -304,6 +304,8 @@ def to_ibis(cls, typ: sat.TypeEngine, nullable: bool = True) -> dt.DataType:
elif isinstance(typ, sa.DateTime):
timezone = "UTC" if typ.timezone else None
return dt.Timestamp(timezone, nullable=nullable)
elif isinstance(typ, sat.String):
return dt.String(nullable=nullable)
elif geospatial_supported and isinstance(typ, ga.types._GISType):
name = typ.geometry_type.upper()
try:
Expand Down
5 changes: 5 additions & 0 deletions ibis/backends/tests/test_client.py
Expand Up @@ -210,6 +210,11 @@ def tmpcon(alchemy_con):
return alchemy_con._from_url(alchemy_con.con.url)


@mark.broken(
["oracle"],
reason="oracle temp tables aren't cleaned up on reconnect -- they need to "
"be switched from using atexit to weakref.finalize",
)
@mark.notimpl(["trino", "druid"], reason="doesn't implement temporary tables")
@mark.notyet(
["sqlite"], reason="sqlite only support temporary tables in temporary databases"
Expand Down

0 comments on commit 8b33b35

Please sign in to comment.