Skip to content

Commit

Permalink
Update to use new arrow apis
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Oct 18, 2021
1 parent 537552a commit 95a8c58
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
18 changes: 10 additions & 8 deletions datafusion/src/physical_plan/expressions/in_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,17 @@ macro_rules! compare_op_scalar {
// same as $left.len()
let buffer = unsafe { MutableBuffer::from_trusted_len_iter_bool(comparison) };

let data = ArrayData::new(
DataType::Boolean,
$left.len(),
None,
null_bit_buffer,
0,
vec![Buffer::from(buffer)],
let data = unsafe {
ArrayData::new_unchecked(
DataType::Boolean,
$left.len(),
None,
null_bit_buffer,
0,
vec![Buffer::from(buffer)],
vec![],
);
)
};
Ok(BooleanArray::from(data))
}};
}
Expand Down
6 changes: 4 additions & 2 deletions datafusion/src/physical_plan/hash_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,11 +678,13 @@ fn build_join_indexes(
let left = ArrayData::builder(DataType::UInt64)
.len(left_indices.len())
.add_buffer(left_indices.finish())
.build();
.build()
.unwrap();
let right = ArrayData::builder(DataType::UInt32)
.len(right_indices.len())
.add_buffer(right_indices.finish())
.build();
.build()
.unwrap();

Ok((
PrimitiveArray::<UInt64Type>::from(left),
Expand Down

0 comments on commit 95a8c58

Please sign in to comment.