@@ -196,6 +196,9 @@ def visit_unique_constraint(self, constraint, **kw):
196196 "they will be omitted when generating DDL statements." )
197197 return None
198198
199+ def visit_create_index (self , create , ** kw ):
200+ return "SELECT 1;"
201+
199202
200203class CrateTypeCompiler (compiler .GenericTypeCompiler ):
201204
@@ -244,6 +247,30 @@ def visit_FLOAT_VECTOR(self, type_, **kw):
244247 raise ValueError ("FloatVector must be initialized with dimension size" )
245248 return f"FLOAT_VECTOR({ dimensions } )"
246249
250+ def visit_BLOB (self , type_ , ** kw ):
251+ return "STRING"
252+
253+ def visit_FLOAT (self , type_ , ** kw ):
254+ """
255+ From `sqlalchemy.sql.sqltypes.Float`.
256+
257+ When a :paramref:`.Float.precision` is not provided in a
258+ :class:`_types.Float` type some backend may compile this type as
259+ an 8 bytes / 64 bit float datatype. To use a 4 bytes / 32 bit float
260+ datatype a precision <= 24 can usually be provided or the
261+ :class:`_types.REAL` type can be used.
262+ This is known to be the case in the PostgreSQL and MSSQL dialects
263+ that render the type as ``FLOAT`` that's in both an alias of
264+ ``DOUBLE PRECISION``. Other third party dialects may have similar
265+ behavior.
266+ """
267+ if not type_ .precision :
268+ return "FLOAT"
269+ elif type_ .precision <= 24 :
270+ return "FLOAT"
271+ else :
272+ return "DOUBLE"
273+
247274
248275class CrateCompiler (compiler .SQLCompiler ):
249276
0 commit comments