diff options
Diffstat (limited to '')
-rw-r--r-- | sqlglot/schema.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sqlglot/schema.py b/sqlglot/schema.py index f028f5a..f0b279b 100644 --- a/sqlglot/schema.py +++ b/sqlglot/schema.py @@ -398,9 +398,10 @@ class MappingSchema(AbstractMappingSchema[t.Dict[str, str]], Schema): """ if schema_type not in self._type_mapping_cache: dialect = dialect or self.dialect + udt = Dialect.get_or_raise(dialect).SUPPORTS_USER_DEFINED_TYPES try: - expression = exp.DataType.build(schema_type, dialect=dialect) + expression = exp.DataType.build(schema_type, dialect=dialect, udt=udt) self._type_mapping_cache[schema_type] = expression except AttributeError: in_dialect = f" in dialect {dialect}" if dialect else "" |