diff --git a/ibis/expr/datatypes.py b/ibis/expr/datatypes.py index 599a04d6d539..301d2c496d1d 100644 --- a/ibis/expr/datatypes.py +++ b/ibis/expr/datatypes.py @@ -129,6 +129,9 @@ def _literal_value_hash_key(self, value) -> int: class Any(DataType): + scalar = ir.AnyScalar + column = ir.AnyColumn + __slots__ = () diff --git a/ibis/sql/alchemy.py b/ibis/sql/alchemy.py index 8d4621cd5011..62102e5537b5 100644 --- a/ibis/sql/alchemy.py +++ b/ibis/sql/alchemy.py @@ -136,6 +136,21 @@ def sa_double(_, satype, nullable=True): return dt.Double(nullable=nullable) +@dt.dtype.register(PostgreSQLDialect, sa.dialects.postgresql.UUID) +def sa_uuid(_, satype, nullable=True): + return dt.Any(nullable=nullable) + + +@dt.dtype.register(PostgreSQLDialect, sa.dialects.postgresql.JSON) +def sa_json(_, satype, nullable=True): + return dt.Any(nullable=nullable) + + +@dt.dtype.register(PostgreSQLDialect, sa.dialects.postgresql.JSONB) +def sa_jsonb(_, satype, nullable=True): + return dt.Any(nullable=nullable) + + if geospatial_supported: @dt.dtype.register(SQLAlchemyDialect, (ga.Geometry, ga.types._GISType))