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