Skip to content

Commit b36f5e2

Browse files
authored
Minor: Move proxy to datafusion common (apache#10561)
* move proxy to common Signed-off-by: jayzhan211 <[email protected]> * fix doc Signed-off-by: jayzhan211 <[email protected]> * move to utils Signed-off-by: jayzhan211 <[email protected]> * fix doc Signed-off-by: jayzhan211 <[email protected]> --------- Signed-off-by: jayzhan211 <[email protected]>
1 parent e6920c3 commit b36f5e2

File tree

12 files changed

+18
-11
lines changed

12 files changed

+18
-11
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ doc-comment = "0.3"
9393
env_logger = "0.11"
9494
futures = "0.3"
9595
half = { version = "2.2.1", default-features = false }
96+
hashbrown = { version = "0.14", features = ["raw"] }
9697
indexmap = "2.0.0"
9798
itertools = "0.12"
9899
log = "^0.4"

datafusion-cli/Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

datafusion/common/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ arrow-buffer = { workspace = true }
5656
arrow-schema = { workspace = true }
5757
chrono = { workspace = true }
5858
half = { workspace = true }
59+
hashbrown = { workspace = true }
5960
libc = "0.2.140"
6061
num_cpus = { workspace = true }
6162
object_store = { workspace = true, optional = true }

datafusion/common/src/utils.rs renamed to datafusion/common/src/utils/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
//! This module provides the bisect function, which implements binary search.
1919
20+
pub mod proxy;
21+
2022
use crate::error::{_internal_datafusion_err, _internal_err};
2123
use crate::{arrow_datafusion_err, DataFusionError, Result, ScalarValue};
2224
use arrow::array::{ArrayRef, PrimitiveArray};

datafusion/execution/src/memory_pool/proxy.rs renamed to datafusion/common/src/utils/proxy.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub trait VecAllocExt {
3131
///
3232
/// # Example:
3333
/// ```
34-
/// # use datafusion_execution::memory_pool::proxy::VecAllocExt;
34+
/// # use datafusion_common::utils::proxy::VecAllocExt;
3535
/// // use allocated to incrementally track how much memory is allocated in the vec
3636
/// let mut allocated = 0;
3737
/// let mut vec = Vec::new();
@@ -49,7 +49,7 @@ pub trait VecAllocExt {
4949
/// ```
5050
/// # Example with other allocations:
5151
/// ```
52-
/// # use datafusion_execution::memory_pool::proxy::VecAllocExt;
52+
/// # use datafusion_common::utils::proxy::VecAllocExt;
5353
/// // You can use the same allocated size to track memory allocated by
5454
/// // another source. For example
5555
/// let mut allocated = 27;
@@ -68,7 +68,7 @@ pub trait VecAllocExt {
6868
///
6969
/// # Example:
7070
/// ```
71-
/// # use datafusion_execution::memory_pool::proxy::VecAllocExt;
71+
/// # use datafusion_common::utils::proxy::VecAllocExt;
7272
/// let mut vec = Vec::new();
7373
/// // Push data into the vec and the accounting will be updated to reflect
7474
/// // memory allocation
@@ -119,7 +119,7 @@ pub trait RawTableAllocExt {
119119
///
120120
/// # Example:
121121
/// ```
122-
/// # use datafusion_execution::memory_pool::proxy::RawTableAllocExt;
122+
/// # use datafusion_common::utils::proxy::RawTableAllocExt;
123123
/// # use hashbrown::raw::RawTable;
124124
/// let mut table = RawTable::new();
125125
/// let mut allocated = 0;

datafusion/core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ flate2 = { version = "1.0.24", optional = true }
111111
futures = { workspace = true }
112112
glob = "0.3.0"
113113
half = { workspace = true }
114-
hashbrown = { version = "0.14", features = ["raw"] }
114+
hashbrown = { workspace = true }
115115
indexmap = { workspace = true }
116116
itertools = { workspace = true }
117117
log = { workspace = true }

datafusion/execution/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ dashmap = { workspace = true }
4242
datafusion-common = { workspace = true, default-features = true }
4343
datafusion-expr = { workspace = true }
4444
futures = { workspace = true }
45-
hashbrown = { version = "0.14", features = ["raw"] }
45+
hashbrown = { workspace = true }
4646
log = { workspace = true }
4747
object_store = { workspace = true }
4848
parking_lot = { workspace = true }

datafusion/execution/src/memory_pool/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ use datafusion_common::Result;
2222
use std::{cmp::Ordering, sync::Arc};
2323

2424
mod pool;
25-
pub mod proxy;
25+
pub mod proxy {
26+
pub use datafusion_common::utils::proxy::{RawTableAllocExt, VecAllocExt};
27+
}
2628

2729
pub use pool::*;
2830

datafusion/functions/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ datafusion-common = { workspace = true }
7474
datafusion-execution = { workspace = true }
7575
datafusion-expr = { workspace = true }
7676
datafusion-physical-expr = { workspace = true, default-features = true }
77-
hashbrown = { version = "0.14", features = ["raw"], optional = true }
77+
hashbrown = { workspace = true, optional = true }
7878
hex = { version = "0.4", optional = true }
7979
itertools = { workspace = true }
8080
log = { workspace = true }

datafusion/optimizer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ chrono = { workspace = true }
4646
datafusion-common = { workspace = true, default-features = true }
4747
datafusion-expr = { workspace = true }
4848
datafusion-physical-expr = { workspace = true }
49-
hashbrown = { version = "0.14", features = ["raw"] }
49+
hashbrown = { workspace = true }
5050
indexmap = { workspace = true }
5151
itertools = { workspace = true }
5252
log = { workspace = true }

0 commit comments

Comments
 (0)