File tree 2 files changed +22
-1
lines changed
tests/routers/v2/connector
2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ def _transform_column_type(self, data_type):
142
142
"smallint" : WrenEngineColumnType .SMALLINT ,
143
143
"tinyint" : WrenEngineColumnType .TINYINT ,
144
144
"byteint" : WrenEngineColumnType .TINYINT ,
145
- # Decimal
145
+ # Float
146
146
"float4" : WrenEngineColumnType .FLOAT4 ,
147
147
"float" : WrenEngineColumnType .FLOAT8 ,
148
148
"float8" : WrenEngineColumnType .FLOAT8 ,
Original file line number Diff line number Diff line change @@ -267,6 +267,27 @@ def test_metadata_list_tables():
267
267
json = {"connectionInfo" : connection_info },
268
268
)
269
269
assert response .status_code == 200
270
+ tables = response .json ()
271
+ assert len (tables ) == 8
272
+ table = next (filter (lambda t : t ["name" ] == "TPCH_SF1.ORDERS" , tables ))
273
+ assert table ["name" ] == "TPCH_SF1.ORDERS"
274
+ assert table ["primaryKey" ] is not None
275
+ assert table ["description" ] == "Orders data as defined by TPC-H"
276
+ assert table ["properties" ] == {
277
+ "catalog" : "SNOWFLAKE_SAMPLE_DATA" ,
278
+ "schema" : "TPCH_SF1" ,
279
+ "table" : "ORDERS" ,
280
+ }
281
+ assert len (table ["columns" ]) == 9
282
+ column = next (filter (lambda c : c ["name" ] == "O_COMMENT" , table ["columns" ]))
283
+ assert column == {
284
+ "name" : "O_COMMENT" ,
285
+ "nestedColumns" : None ,
286
+ "type" : "TEXT" ,
287
+ "notNull" : True ,
288
+ "description" : None ,
289
+ "properties" : None ,
290
+ }
270
291
271
292
def test_metadata_list_constraints ():
272
293
response = client .post (
You can’t perform that action at this time.
0 commit comments