Skip to content

Commit e5dfc61

Browse files
committed
refactor: convert ArrowBytesViewMap to HashTable
For apache#13256.
1 parent 1bd8a36 commit e5dfc61

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

datafusion/physical-expr-common/src/binary_view_map.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use arrow::array::cast::AsArray;
2424
use arrow::array::{Array, ArrayBuilder, ArrayRef, GenericByteViewBuilder};
2525
use arrow::datatypes::{BinaryViewType, ByteViewType, DataType, StringViewType};
2626
use datafusion_common::hash_utils::create_hashes;
27-
use datafusion_common::utils::proxy::{RawTableAllocExt, VecAllocExt};
27+
use datafusion_common::utils::proxy::{HashTableAllocExt, VecAllocExt};
2828
use std::fmt::Debug;
2929
use std::sync::Arc;
3030

@@ -122,7 +122,7 @@ where
122122
/// Should the output be StringView or BinaryView?
123123
output_type: OutputType,
124124
/// Underlying hash set for each distinct value
125-
map: hashbrown::raw::RawTable<Entry<V>>,
125+
map: hashbrown::hash_table::HashTable<Entry<V>>,
126126
/// Total size of the map in bytes
127127
map_size: usize,
128128

@@ -148,7 +148,7 @@ where
148148
pub fn new(output_type: OutputType) -> Self {
149149
Self {
150150
output_type,
151-
map: hashbrown::raw::RawTable::with_capacity(INITIAL_MAP_CAPACITY),
151+
map: hashbrown::hash_table::HashTable::with_capacity(INITIAL_MAP_CAPACITY),
152152
map_size: 0,
153153
builder: GenericByteViewBuilder::new(),
154154
random_state: RandomState::new(),
@@ -274,7 +274,7 @@ where
274274
// get the value as bytes
275275
let value: &[u8] = value.as_ref();
276276

277-
let entry = self.map.get_mut(hash, |header| {
277+
let entry = self.map.find_mut(hash, |header| {
278278
let v = self.builder.get_value(header.view_idx);
279279

280280
if v.len() != value.len() {

0 commit comments

Comments
 (0)