@@ -72,21 +72,21 @@ def catalog_name() -> str:
72
72
73
73
@pytest .fixture (name = "random_table_identifier" )
74
74
def fixture_random_table_identifier (warehouse : Path , database_name : str , table_name : str ) -> Identifier :
75
- os .makedirs (f"{ warehouse } /{ database_name } .db /{ table_name } /metadata/" , exist_ok = True )
75
+ os .makedirs (f"{ warehouse } /{ database_name } /{ table_name } /metadata/" , exist_ok = True )
76
76
return database_name , table_name
77
77
78
78
79
79
@pytest .fixture (name = "another_random_table_identifier" )
80
80
def fixture_another_random_table_identifier (warehouse : Path , database_name : str , table_name : str ) -> Identifier :
81
81
database_name = database_name + "_new"
82
82
table_name = table_name + "_new"
83
- os .makedirs (f"{ warehouse } /{ database_name } .db /{ table_name } /metadata/" , exist_ok = True )
83
+ os .makedirs (f"{ warehouse } /{ database_name } /{ table_name } /metadata/" , exist_ok = True )
84
84
return database_name , table_name
85
85
86
86
87
87
@pytest .fixture (name = "random_hierarchical_identifier" )
88
88
def fixture_random_hierarchical_identifier (warehouse : Path , hierarchical_namespace_name : str , table_name : str ) -> Identifier :
89
- os .makedirs (f"{ warehouse } /{ hierarchical_namespace_name } .db /{ table_name } /metadata/" , exist_ok = True )
89
+ os .makedirs (f"{ warehouse } /{ hierarchical_namespace_name } /{ table_name } /metadata/" , exist_ok = True )
90
90
return Catalog .identifier_to_tuple ("." .join ((hierarchical_namespace_name , table_name )))
91
91
92
92
@@ -96,7 +96,7 @@ def fixture_another_random_hierarchical_identifier(
96
96
) -> Identifier :
97
97
hierarchical_namespace_name = hierarchical_namespace_name + "_new"
98
98
table_name = table_name + "_new"
99
- os .makedirs (f"{ warehouse } /{ hierarchical_namespace_name } .db /{ table_name } /metadata/" , exist_ok = True )
99
+ os .makedirs (f"{ warehouse } /{ hierarchical_namespace_name } /{ table_name } /metadata/" , exist_ok = True )
100
100
return Catalog .identifier_to_tuple ("." .join ((hierarchical_namespace_name , table_name )))
101
101
102
102
@@ -115,7 +115,7 @@ def catalog_memory(catalog_name: str, warehouse: Path) -> Generator[SqlCatalog,
115
115
@pytest .fixture (scope = "module" )
116
116
def catalog_sqlite (catalog_name : str , warehouse : Path ) -> Generator [SqlCatalog , None , None ]:
117
117
props = {
118
- "uri" : f"sqlite:////{ warehouse } /sql-catalog.db " ,
118
+ "uri" : f"sqlite:////{ warehouse } /sql-catalog" ,
119
119
"warehouse" : f"file://{ warehouse } " ,
120
120
}
121
121
catalog = SqlCatalog (catalog_name , ** props )
@@ -126,7 +126,7 @@ def catalog_sqlite(catalog_name: str, warehouse: Path) -> Generator[SqlCatalog,
126
126
127
127
@pytest .fixture (scope = "module" )
128
128
def catalog_uri (warehouse : Path ) -> str :
129
- return f"sqlite:////{ warehouse } /sql-catalog.db "
129
+ return f"sqlite:////{ warehouse } /sql-catalog"
130
130
131
131
132
132
@pytest .fixture (scope = "module" )
@@ -137,7 +137,7 @@ def alchemy_engine(catalog_uri: str) -> Engine:
137
137
@pytest .fixture (scope = "module" )
138
138
def catalog_sqlite_without_rowcount (catalog_name : str , warehouse : Path ) -> Generator [SqlCatalog , None , None ]:
139
139
props = {
140
- "uri" : f"sqlite:////{ warehouse } /sql-catalog.db " ,
140
+ "uri" : f"sqlite:////{ warehouse } /sql-catalog" ,
141
141
"warehouse" : f"file://{ warehouse } " ,
142
142
}
143
143
catalog = SqlCatalog (catalog_name , ** props )
@@ -150,7 +150,7 @@ def catalog_sqlite_without_rowcount(catalog_name: str, warehouse: Path) -> Gener
150
150
@pytest .fixture (scope = "module" )
151
151
def catalog_sqlite_fsspec (catalog_name : str , warehouse : Path ) -> Generator [SqlCatalog , None , None ]:
152
152
props = {
153
- "uri" : f"sqlite:////{ warehouse } /sql-catalog.db " ,
153
+ "uri" : f"sqlite:////{ warehouse } /sql-catalog" ,
154
154
"warehouse" : f"file://{ warehouse } " ,
155
155
PY_IO_IMPL : FSSPEC_FILE_IO ,
156
156
}
@@ -176,7 +176,7 @@ def test_creation_with_echo_parameter(catalog_name: str, warehouse: Path) -> Non
176
176
177
177
for echo_param , expected_echo_value in test_cases :
178
178
props = {
179
- "uri" : f"sqlite:////{ warehouse } /sql-catalog.db " ,
179
+ "uri" : f"sqlite:////{ warehouse } /sql-catalog" ,
180
180
"warehouse" : f"file://{ warehouse } " ,
181
181
}
182
182
# None is for default value
@@ -199,7 +199,7 @@ def test_creation_with_pool_pre_ping_parameter(catalog_name: str, warehouse: Pat
199
199
200
200
for pool_pre_ping_param , expected_pool_pre_ping_value in test_cases :
201
201
props = {
202
- "uri" : f"sqlite:////{ warehouse } /sql-catalog.db " ,
202
+ "uri" : f"sqlite:////{ warehouse } /sql-catalog" ,
203
203
"warehouse" : f"file://{ warehouse } " ,
204
204
}
205
205
# None is for default value
@@ -219,7 +219,7 @@ def test_creation_from_impl(catalog_name: str, warehouse: Path) -> None:
219
219
catalog_name ,
220
220
** {
221
221
"py-catalog-impl" : "pyiceberg.catalog.sql.SqlCatalog" ,
222
- "uri" : f"sqlite:////{ warehouse } /sql-catalog.db " ,
222
+ "uri" : f"sqlite:////{ warehouse } /sql-catalog" ,
223
223
"warehouse" : f"file://{ warehouse } " ,
224
224
},
225
225
),
@@ -493,7 +493,7 @@ def test_create_table_with_given_location_removes_trailing_slash(
493
493
identifier_tuple = Catalog .identifier_to_tuple (table_identifier )
494
494
namespace = Catalog .namespace_from (table_identifier )
495
495
table_name = Catalog .table_name_from (identifier_tuple )
496
- location = f"file://{ warehouse } /{ catalog .name } .db /{ table_name } -given"
496
+ location = f"file://{ warehouse } /{ catalog .name } /{ table_name } -given"
497
497
catalog .create_namespace (namespace )
498
498
catalog .create_table (table_identifier , table_schema_nested , location = f"{ location } /" )
499
499
table = catalog .load_table (table_identifier )
@@ -1235,7 +1235,7 @@ def test_load_namespace_properties(catalog: SqlCatalog, namespace: str) -> None:
1235
1235
warehouse_location = "/test/location"
1236
1236
test_properties = {
1237
1237
"comment" : "this is a test description" ,
1238
- "location" : f"{ warehouse_location } /{ namespace } .db " ,
1238
+ "location" : f"{ warehouse_location } /{ namespace } " ,
1239
1239
"test_property1" : "1" ,
1240
1240
"test_property2" : "2" ,
1241
1241
"test_property3" : "3" ,
@@ -1286,7 +1286,7 @@ def test_update_namespace_properties(catalog: SqlCatalog, namespace: str) -> Non
1286
1286
warehouse_location = "/test/location"
1287
1287
test_properties = {
1288
1288
"comment" : "this is a test description" ,
1289
- "location" : f"{ warehouse_location } /{ namespace } .db " ,
1289
+ "location" : f"{ warehouse_location } /{ namespace } " ,
1290
1290
"test_property1" : "1" ,
1291
1291
"test_property2" : "2" ,
1292
1292
"test_property3" : "3" ,
@@ -1306,7 +1306,7 @@ def test_update_namespace_properties(catalog: SqlCatalog, namespace: str) -> Non
1306
1306
"comment" : "updated test description" ,
1307
1307
"test_property4" : "4" ,
1308
1308
"test_property5" : "5" ,
1309
- "location" : f"{ warehouse_location } /{ namespace } .db " ,
1309
+ "location" : f"{ warehouse_location } /{ namespace } " ,
1310
1310
}
1311
1311
1312
1312
0 commit comments