@@ -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
@@ -255,6 +258,30 @@ def visit_TIMESTAMP(self, type_, **kw):
255258 (type_ .timezone and "WITH" or "WITHOUT" ) + " TIME ZONE" ,
256259 )
257260
261+ def visit_BLOB (self , type_ , ** kw ):
262+ return "STRING"
263+
264+ def visit_FLOAT (self , type_ , ** kw ):
265+ """
266+ From `sqlalchemy.sql.sqltypes.Float`.
267+
268+ When a :paramref:`.Float.precision` is not provided in a
269+ :class:`_types.Float` type some backend may compile this type as
270+ an 8 bytes / 64 bit float datatype. To use a 4 bytes / 32 bit float
271+ datatype a precision <= 24 can usually be provided or the
272+ :class:`_types.REAL` type can be used.
273+ This is known to be the case in the PostgreSQL and MSSQL dialects
274+ that render the type as ``FLOAT`` that's in both an alias of
275+ ``DOUBLE PRECISION``. Other third party dialects may have similar
276+ behavior.
277+ """
278+ if not type_ .precision :
279+ return "FLOAT"
280+ elif type_ .precision <= 24 :
281+ return "FLOAT"
282+ else :
283+ return "DOUBLE"
284+
258285
259286class CrateCompiler (compiler .SQLCompiler ):
260287
0 commit comments