Skip to content

Commit 1174054

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

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

rust/lance/src/datafusion/dataframe.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,15 @@ 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+
#[deprecated(note = "use read_lance instead (which is now unordered by default)")]
187+
fn read_lance_unordered(
188+
&self,
189+
dataset: Arc<Dataset>,
190+
with_row_id: bool,
191+
with_row_addr: bool,
192+
) -> datafusion::common::Result<DataFrame>;
193+
185194
/// Creates a DataFrame for reading a stream of data
186195
///
187196
/// This dataframe may only be queried once, future queries will fail
@@ -241,6 +250,20 @@ impl SessionContextExt for SessionContext {
241250
)))
242251
}
243252

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

0 commit comments

Comments
 (0)