Skip to content

Commit be12e42

Browse files
author
niuyulin
committed
deprecate read_lance_unordered function
1 parent d087753 commit be12e42

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

rust/lance/src/datafusion/dataframe.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,16 @@ pub trait SessionContextExt {
182182
with_row_addr: bool,
183183
) -> datafusion::common::Result<DataFrame>;
184184

185+
/// Creates a DataFrame for reading a Lance dataset without ordering
186+
#[allow(dead_code)]
187+
#[deprecated(note = "use read_lance instead")]
188+
fn read_lance_unordered(
189+
&self,
190+
dataset: Arc<Dataset>,
191+
with_row_id: bool,
192+
with_row_addr: bool,
193+
) -> datafusion::common::Result<DataFrame>;
194+
185195
/// Creates a DataFrame for reading a stream of data
186196
///
187197
/// This dataframe may only be queried once, future queries will fail
@@ -241,6 +251,20 @@ impl SessionContextExt for SessionContext {
241251
)))
242252
}
243253

254+
fn read_lance_unordered(
255+
&self,
256+
dataset: Arc<Dataset>,
257+
with_row_id: bool,
258+
with_row_addr: bool,
259+
) -> datafusion::common::Result<DataFrame> {
260+
self.read_table(Arc::new(LanceTableProvider::new_with_ordering(
261+
dataset,
262+
with_row_id,
263+
with_row_addr,
264+
false,
265+
)))
266+
}
267+
244268
fn read_one_shot(
245269
&self,
246270
data: SendableRecordBatchStream,

0 commit comments

Comments
 (0)