@@ -55,7 +55,7 @@ pub use self::url::ListingTableUrl;
5555use crate :: file_groups:: FileGroup ;
5656use chrono:: TimeZone ;
5757use datafusion_common:: stats:: Precision ;
58- use datafusion_common:: { ColumnStatistics , Result , exec_datafusion_err} ;
58+ use datafusion_common:: { ColumnStatistics , Result , exec_datafusion_err, TableReference } ;
5959use datafusion_common:: { ScalarValue , Statistics } ;
6060use datafusion_physical_expr:: LexOrdering ;
6161use futures:: { Stream , StreamExt } ;
@@ -151,6 +151,7 @@ pub struct PartitionedFile {
151151 pub extensions : Option < Arc < dyn std:: any:: Any + Send + Sync > > ,
152152 /// The estimated size of the parquet metadata, in bytes
153153 pub metadata_size_hint : Option < usize > ,
154+ pub table_reference : Option < TableReference > ,
154155}
155156
156157impl PartitionedFile {
@@ -170,6 +171,7 @@ impl PartitionedFile {
170171 ordering : None ,
171172 extensions : None ,
172173 metadata_size_hint : None ,
174+ table_reference : None
173175 }
174176 }
175177
@@ -183,6 +185,7 @@ impl PartitionedFile {
183185 ordering : None ,
184186 extensions : None ,
185187 metadata_size_hint : None ,
188+ table_reference : None
186189 }
187190 }
188191
@@ -202,6 +205,7 @@ impl PartitionedFile {
202205 ordering : None ,
203206 extensions : None ,
204207 metadata_size_hint : None ,
208+ table_reference : None
205209 }
206210 . with_range ( start, end)
207211 }
@@ -213,6 +217,12 @@ impl PartitionedFile {
213217 self
214218 }
215219
220+ pub fn with_table_reference ( mut self , table_reference : Option < TableReference > ) -> Self {
221+ self . table_reference = table_reference;
222+ self
223+ }
224+
225+
216226 /// Size of the file to be scanned (taking into account the range, if present).
217227 pub fn effective_size ( & self ) -> u64 {
218228 if let Some ( range) = & self . range {
@@ -339,6 +349,7 @@ impl From<ObjectMeta> for PartitionedFile {
339349 ordering : None ,
340350 extensions : None ,
341351 metadata_size_hint : None ,
352+ table_reference : None ,
342353 }
343354 }
344355}
@@ -536,6 +547,7 @@ pub fn generate_test_files(num_files: usize, overlap_factor: f64) -> Vec<FileGro
536547 ordering : None ,
537548 extensions : None ,
538549 metadata_size_hint : None ,
550+ table_reference : None ,
539551 } ;
540552 files. push ( file) ;
541553 }
0 commit comments