@@ -244,7 +244,7 @@ def test_ibis_sql_types() -> None:
244
244
str (dt .String ()): "string" ,
245
245
str (dt .Date ()): "date" ,
246
246
str (dt .Time ()): "time" ,
247
- str (dt .Timestamp ()): "timestamp(6) " , # duckdb sets default precision
247
+ str (dt .Timestamp ()): "timestamp" , # duckdb sets default precision
248
248
str (dt .Interval (unit = "D" )): "interval('us')" ,
249
249
str (dt .Array (value_type = dt .Int32 ())): "array<int32>" ,
250
250
str (
@@ -275,12 +275,10 @@ def test_ibis_sql_types() -> None:
275
275
str (dt .Time ()): "time" ,
276
276
str (dt .Timestamp ()): "datetime" ,
277
277
str (dt .Interval (unit = "D" )): "string" , # default case
278
- str (dt .Array (value_type = dt .Int32 ())): "string" , # default case
279
- str (
280
- dt .Map (key_type = dt .String (), value_type = dt .Int32 ())
281
- ): "string" , # default case
282
- str (dt .Struct (fields = {"foo" : dt .Int32 ()})): "string" , # default case
283
- str (dt .JSON ()): "string" , # default case
278
+ str (dt .Array (value_type = dt .Int32 ())): "unknown" ,
279
+ str (dt .Map (key_type = dt .String (), value_type = dt .Int32 ())): "unknown" ,
280
+ str (dt .Struct (fields = {"foo" : dt .Int32 ()})): "unknown" ,
281
+ str (dt .JSON ()): "unknown" , # default case
284
282
str (dt .MACADDR ()): "string" , # default case
285
283
str (dt .UUID ()): "string" , # default case
286
284
}
@@ -303,8 +301,12 @@ def test_ibis_sql_types() -> None:
303
301
304
302
for column in table .columns :
305
303
assert column .name in expected_marimo_type .keys ()
306
- assert column .type == expected_marimo_type [column .name ]
307
- assert column .external_type == expected_external_type [column .name ]
304
+ assert column .type == expected_marimo_type [column .name ], (
305
+ f"{ column .name } { column .type } { expected_marimo_type [column .name ]} "
306
+ )
307
+ assert column .external_type == expected_external_type [column .name ], (
308
+ f"{ column .name } { column .external_type } { expected_external_type [column .name ]} "
309
+ )
308
310
309
311
310
312
@pytest .mark .skipif (not HAS_IBIS , reason = "Ibis not installed" )
@@ -345,24 +347,7 @@ def test_ibis_type_conversion() -> None:
345
347
assert to_marimo (dt .Time ()) == "time"
346
348
assert to_marimo (dt .Timestamp ()) == "datetime"
347
349
348
- # unhandled cases will be converted to string
349
- with pytest .raises (IbisToMarimoConversionError ):
350
- to_marimo (dt .Interval (unit = "D" ))
351
-
352
- # nested types
353
- with pytest .raises (IbisToMarimoConversionError ):
354
- to_marimo (dt .Array (value_type = dt .Int32 ()))
355
-
356
- with pytest .raises (IbisToMarimoConversionError ):
357
- to_marimo (dt .Map (key_type = dt .String (), value_type = dt .Int32 ()))
358
-
359
- with pytest .raises (IbisToMarimoConversionError ):
360
- to_marimo (dt .Struct (fields = {"foo" : dt .Int32 ()}))
361
-
362
350
# geometry
363
- with pytest .raises (IbisToMarimoConversionError ):
364
- to_marimo (dt .MultiLineString ())
365
-
366
351
with pytest .raises (IbisToMarimoConversionError ):
367
352
to_marimo (dt .MultiPoint ())
368
353
@@ -378,16 +363,6 @@ def test_ibis_type_conversion() -> None:
378
363
with pytest .raises (IbisToMarimoConversionError ):
379
364
to_marimo (dt .Polygon ())
380
365
381
- # special types
382
- with pytest .raises (IbisToMarimoConversionError ):
383
- to_marimo (dt .JSON ())
384
-
385
- with pytest .raises (IbisToMarimoConversionError ):
386
- to_marimo (dt .MACADDR ())
387
-
388
- with pytest .raises (IbisToMarimoConversionError ):
389
- to_marimo (dt .UUID ())
390
-
391
366
392
367
@pytest .mark .skipif (not HAS_IBIS , reason = "Ibis not installed" )
393
368
def test_ibis_engine_get_table_details (ibis_backend : SQLBackend ) -> None :
0 commit comments