Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/daft-core/src/array/ops/sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,19 @@ pub fn build_multi_array_bicompare(
.zip(descending.iter())
.zip(nulls_first.iter())
{
// Use the Arrow-rs export path to obtain canonical Arrow arrays,
// then bridge them into the legacy arrow2-based comparator builder.
let l_arrow = l.to_arrow()?;
let r_arrow = r.to_arrow()?;

#[allow(deprecated, reason = "arrow2 migration")]
let l_arrow2: Box<dyn daft_arrow::array::Array> = Box::from(l_arrow.as_ref() as &dyn Array);
#[allow(deprecated, reason = "arrow2 migration")]
let r_arrow2: Box<dyn daft_arrow::array::Array> = Box::from(r_arrow.as_ref() as &dyn Array);

cmp_list.push(build_nulls_first_compare_with_nulls(
l.to_arrow2().as_ref(),
r.to_arrow2().as_ref(),
l_arrow2.as_ref(),
r_arrow2.as_ref(),
*desc,
*nf,
)?);
Expand Down
Loading