@@ -95,7 +95,8 @@ def test_fetchall_arrow_drains_all_batches(int_schema):
9595 assert rs .has_more_rows is False
9696
9797
98- def test_geospatial_string_and_binary_values_keep_logical_type ():
98+ @pytest .mark .parametrize ("disable_pandas" , [False , True ])
99+ def test_geospatial_string_and_binary_values_keep_logical_type (disable_pandas ):
99100 wkb = bytes .fromhex ("0101000000000000000000F03F0000000000000040" )
100101 geo_metadata = {
101102 b"databricks.type_name" : b"GEOMETRY" ,
@@ -108,7 +109,8 @@ def test_geospatial_string_and_binary_values_keep_logical_type():
108109 schema = string_schema ,
109110 )
110111 string_rows = _make_rs (
111- _FakeKernelHandle (string_schema , [string_batch ]), disable_pandas = True
112+ _FakeKernelHandle (string_schema , [string_batch ]),
113+ disable_pandas = disable_pandas ,
112114 ).fetchall ()
113115 assert [row [0 ] for row in string_rows ] == ["SRID=4326;POINT(1 2)" , None ]
114116
@@ -124,10 +126,14 @@ def test_geospatial_string_and_binary_values_keep_logical_type():
124126 schema = binary_schema ,
125127 )
126128 binary_rs = _make_rs (
127- _FakeKernelHandle (binary_schema , [binary_batch ]), disable_pandas = True
129+ _FakeKernelHandle (binary_schema , [binary_batch ]),
130+ disable_pandas = disable_pandas ,
128131 )
129132 assert binary_rs .description [0 ][1 ] == "geometry"
130133 binary_rows = binary_rs .fetchall ()
134+ assert isinstance (binary_rows [0 ][0 ], dict )
135+ assert isinstance (binary_rows [0 ][0 ]["srid" ], int )
136+ assert isinstance (binary_rows [0 ][0 ]["wkb" ], bytes )
131137 assert binary_rows [0 ][0 ] == {"srid" : 4326 , "wkb" : wkb }
132138 assert binary_rows [1 ][0 ] is None
133139
0 commit comments