@@ -32,15 +32,9 @@ fn create_catalog_rowid_two_files(catalog_path: &Path) -> Result<()> {
3232
3333 conn. execute ( "CREATE TABLE c.t(i INTEGER);" , [ ] ) ?;
3434 // First file: rows 0..3
35- conn. execute (
36- "INSERT INTO c.t SELECT i FROM range(0, 3) t(i);" ,
37- [ ] ,
38- ) ?;
35+ conn. execute ( "INSERT INTO c.t SELECT i FROM range(0, 3) t(i);" , [ ] ) ?;
3936 // Second file: rows 10..15
40- conn. execute (
41- "INSERT INTO c.t SELECT i FROM range(10, 15) t(i);" ,
42- [ ] ,
43- ) ?;
37+ conn. execute ( "INSERT INTO c.t SELECT i FROM range(10, 15) t(i);" , [ ] ) ?;
4438 Ok ( ( ) )
4539}
4640
@@ -131,8 +125,8 @@ fn collect_rowid_i_sorted(batches: &[RecordBatch]) -> Vec<(i64, i32)> {
131125
132126#[ tokio:: test]
133127async fn rowid_disabled_by_default ( ) -> DataFusionResult < ( ) > {
134- let temp = TempDir :: new ( )
135- . map_err ( |e| datafusion:: error:: DataFusionError :: External ( Box :: new ( e) ) ) ?;
128+ let temp =
129+ TempDir :: new ( ) . map_err ( |e| datafusion:: error:: DataFusionError :: External ( Box :: new ( e) ) ) ?;
136130 let path = temp. path ( ) . join ( "rowid_default.ducklake" ) ;
137131 create_catalog_rowid_two_files ( & path) . map_err ( common:: to_datafusion_error) ?;
138132
@@ -168,8 +162,8 @@ async fn rowid_disabled_by_default() -> DataFusionResult<()> {
168162
169163#[ tokio:: test]
170164async fn rowid_sequential_across_files ( ) -> DataFusionResult < ( ) > {
171- let temp = TempDir :: new ( )
172- . map_err ( |e| datafusion:: error:: DataFusionError :: External ( Box :: new ( e) ) ) ?;
165+ let temp =
166+ TempDir :: new ( ) . map_err ( |e| datafusion:: error:: DataFusionError :: External ( Box :: new ( e) ) ) ?;
173167 let path = temp. path ( ) . join ( "rowid_two_files.ducklake" ) ;
174168 create_catalog_rowid_two_files ( & path) . map_err ( common:: to_datafusion_error) ?;
175169
@@ -194,16 +188,7 @@ async fn rowid_sequential_across_files() -> DataFusionResult<()> {
194188 let pairs = collect_rowid_i_sorted ( & batches) ;
195189 assert_eq ! (
196190 pairs,
197- vec![
198- ( 0 , 0 ) ,
199- ( 1 , 1 ) ,
200- ( 2 , 2 ) ,
201- ( 3 , 10 ) ,
202- ( 4 , 11 ) ,
203- ( 5 , 12 ) ,
204- ( 6 , 13 ) ,
205- ( 7 , 14 ) ,
206- ] ,
191+ vec![ ( 0 , 0 ) , ( 1 , 1 ) , ( 2 , 2 ) , ( 3 , 10 ) , ( 4 , 11 ) , ( 5 , 12 ) , ( 6 , 13 ) , ( 7 , 14 ) , ] ,
207192 "rowids should be contiguous 0..8 across the two files" ,
208193 ) ;
209194
@@ -220,8 +205,8 @@ async fn rowid_sequential_across_files() -> DataFusionResult<()> {
220205
221206#[ tokio:: test]
222207async fn rowid_preserved_under_deletes ( ) -> DataFusionResult < ( ) > {
223- let temp = TempDir :: new ( )
224- . map_err ( |e| datafusion:: error:: DataFusionError :: External ( Box :: new ( e) ) ) ?;
208+ let temp =
209+ TempDir :: new ( ) . map_err ( |e| datafusion:: error:: DataFusionError :: External ( Box :: new ( e) ) ) ?;
225210 let path = temp. path ( ) . join ( "rowid_with_deletes.ducklake" ) ;
226211 create_catalog_rowid_with_deletes ( & path) . map_err ( common:: to_datafusion_error) ?;
227212
@@ -250,8 +235,8 @@ async fn rowid_preserved_under_deletes() -> DataFusionResult<()> {
250235async fn rowid_only_projection ( ) -> DataFusionResult < ( ) > {
251236 // Edge case: physical projection is empty (just rowid). Verifies that
252237 // RowIdExec works when ParquetExec emits zero-column count batches.
253- let temp = TempDir :: new ( )
254- . map_err ( |e| datafusion:: error:: DataFusionError :: External ( Box :: new ( e) ) ) ?;
238+ let temp =
239+ TempDir :: new ( ) . map_err ( |e| datafusion:: error:: DataFusionError :: External ( Box :: new ( e) ) ) ?;
255240 let path = temp. path ( ) . join ( "rowid_only.ducklake" ) ;
256241 create_catalog_rowid_two_files ( & path) . map_err ( common:: to_datafusion_error) ?;
257242
@@ -283,8 +268,8 @@ async fn rowid_preserved_across_update_rewrite() -> DataFusionResult<()> {
283268 // The critical test: UPDATE rewrites the file with embedded rowids.
284269 // Our scan must read those embedded values rather than compute
285270 // `row_id_start + position`, otherwise the rowids drift.
286- let temp = TempDir :: new ( )
287- . map_err ( |e| datafusion:: error:: DataFusionError :: External ( Box :: new ( e) ) ) ?;
271+ let temp =
272+ TempDir :: new ( ) . map_err ( |e| datafusion:: error:: DataFusionError :: External ( Box :: new ( e) ) ) ?;
288273 let path = temp. path ( ) . join ( "rowid_update.ducklake" ) ;
289274 create_catalog_rowid_with_update ( & path) . map_err ( common:: to_datafusion_error) ?;
290275
@@ -319,8 +304,8 @@ async fn rowid_preserved_across_update_rewrite() -> DataFusionResult<()> {
319304#[ tokio:: test]
320305async fn rowid_count_star_unaffected ( ) -> DataFusionResult < ( ) > {
321306 // COUNT(*) should not trigger the rowid path (it asks for zero columns).
322- let temp = TempDir :: new ( )
323- . map_err ( |e| datafusion:: error:: DataFusionError :: External ( Box :: new ( e) ) ) ?;
307+ let temp =
308+ TempDir :: new ( ) . map_err ( |e| datafusion:: error:: DataFusionError :: External ( Box :: new ( e) ) ) ?;
324309 let path = temp. path ( ) . join ( "rowid_count_star.ducklake" ) ;
325310 create_catalog_rowid_two_files ( & path) . map_err ( common:: to_datafusion_error) ?;
326311
0 commit comments