File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -195,15 +195,12 @@ fn parse_schema(schema_str: &str) -> DeltaResult<SchemaRef> {
195195}
196196
197197/// Create a new Delta table with the given schema using the official CreateTable API.
198- async fn create_table (
199- table_url : & Url ,
200- schema : & SchemaRef ,
201- engine : & dyn Engine ,
202- ) -> DeltaResult < ( ) > {
198+ async fn create_table ( table_url : & Url , schema : & SchemaRef , engine : & dyn Engine ) -> DeltaResult < ( ) > {
203199 // Use the new TableManager API to create the table
204200 let table_path = table_url. as_str ( ) ;
205- let create_txn = TableManager :: create_table ( table_path, schema. clone ( ) , "write-table-example/1.0" )
206- . build ( engine) ?;
201+ let create_txn =
202+ TableManager :: create_table ( table_path, schema. clone ( ) , "write-table-example/1.0" )
203+ . build ( engine) ?;
207204
208205 // Commit the metadata - this creates the table
209206 let _txn = create_txn. commit_metadata ( engine, Box :: new ( FileSystemCommitter :: new ( ) ) ) ?;
Original file line number Diff line number Diff line change @@ -304,7 +304,7 @@ mod tests {
304304
305305 #[ test]
306306 fn test_builder_creation ( ) {
307- let schema = Arc :: new ( StructType :: new ( vec ! [ StructField :: new(
307+ let schema = Arc :: new ( StructType :: new_unchecked ( vec ! [ StructField :: new(
308308 "id" ,
309309 DataType :: INTEGER ,
310310 false ,
@@ -320,7 +320,7 @@ mod tests {
320320
321321 #[ test]
322322 fn test_with_table_properties ( ) {
323- let schema = Arc :: new ( StructType :: new ( vec ! [ StructField :: new(
323+ let schema = Arc :: new ( StructType :: new_unchecked ( vec ! [ StructField :: new(
324324 "id" ,
325325 DataType :: INTEGER ,
326326 false ,
@@ -340,7 +340,7 @@ mod tests {
340340
341341 #[ test]
342342 fn test_with_multiple_table_properties ( ) {
343- let schema = Arc :: new ( StructType :: new ( vec ! [ StructField :: new(
343+ let schema = Arc :: new ( StructType :: new_unchecked ( vec ! [ StructField :: new(
344344 "id" ,
345345 DataType :: INTEGER ,
346346 false ,
You can’t perform that action at this time.
0 commit comments