11// SPDX-License-Identifier: Apache-2.0
22// SPDX-FileCopyrightText: Copyright the Vortex contributors
33
4- #[ cfg( feature = "lance" ) ]
5- use std:: fs;
64use std:: fs:: File ;
7- #[ cfg( feature = "lance" ) ]
8- use std:: path:: Path ;
95#[ cfg( not( feature = "lance" ) ) ]
106use std:: path:: PathBuf ;
117use std:: sync:: Arc ;
@@ -14,20 +10,17 @@ use anyhow::anyhow;
1410use arrow_array:: { RecordBatch , RecordBatchReader } ;
1511use arrow_cast:: cast;
1612use arrow_schema:: { ArrowError , DataType , Field , Schema , SchemaRef } ;
17- #[ cfg( feature = "lance" ) ]
18- use lance:: dataset:: Dataset as LanceDataset ;
19- #[ cfg( feature = "lance" ) ]
20- use lance:: dataset:: WriteParams ;
21- #[ cfg( feature = "lance" ) ]
22- use lance_encoding:: version:: LanceFileVersion ;
23- #[ cfg( feature = "lance" ) ]
24- use log:: info;
2513use parquet:: arrow:: arrow_reader:: ParquetRecordBatchReaderBuilder ;
2614#[ cfg( feature = "lance" ) ]
27- use tokio:: fs:: create_dir_all;
28-
29- #[ cfg( feature = "lance" ) ]
30- use crate :: utils:: idempotent_async;
15+ use {
16+ crate :: utils:: idempotent_async,
17+ lance:: dataset:: { Dataset as LanceDataset , WriteParams } ,
18+ lance_encoding:: version:: LanceFileVersion ,
19+ log:: info,
20+ std:: fs,
21+ std:: path:: { Path , PathBuf } ,
22+ tokio:: fs:: create_dir_all,
23+ } ;
3124
3225/// A streaming iterator that reads RecordBatches from multiple Parquet files sequentially.
3326/// Works equally well for single files and multiple files.
0 commit comments