Skip to content

Commit e72ebd3

Browse files
andygrovembutrovichcomphead
authored
deps: Upgrade to DataFusion 54.0.0 (#4062)
Co-authored-by: Matt Butrovich <mbutrovich@gmail.com> Co-authored-by: Matt Butrovich <mbutrovich@users.noreply.github.com> Co-authored-by: comphead <comphead@ukr.net> Co-authored-by: Oleks V <comphead@users.noreply.github.com>
1 parent 75bad47 commit e72ebd3

83 files changed

Lines changed: 416 additions & 782 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎native/Cargo.lock‎

Lines changed: 201 additions & 357 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎native/Cargo.toml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ arrow = { version = "58.3.0", features = ["prettyprint", "ffi", "chrono-tz"] }
3838
async-trait = { version = "0.1" }
3939
bytes = { version = "1.11.1" }
4040
parquet = { version = "58.3.0", default-features = false, features = ["experimental"] }
41-
datafusion = { version = "53.1.0", default-features = false, features = ["unicode_expressions", "crypto_expressions", "nested_expressions", "parquet"] }
42-
datafusion-datasource = { version = "53.1.0" }
43-
datafusion-physical-expr-adapter = { version = "53.1.0" }
44-
datafusion-spark = { version = "53.1.0", features = ["core"] }
41+
datafusion = { version = "54.0.0", default-features = false, features = ["unicode_expressions", "crypto_expressions", "nested_expressions", "parquet"] }
42+
datafusion-datasource = { version = "54.0.0" }
43+
datafusion-physical-expr-adapter = { version = "54.0.0" }
44+
datafusion-spark = { version = "54.0.0", features = ["core"] }
4545
datafusion-comet-spark-expr = { path = "spark-expr" }
4646
datafusion-comet-common = { path = "common" }
4747
datafusion-comet-jni-bridge = { path = "jni-bridge" }

‎native/core/Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jni = { version = "0.22.4", features = ["invocation"] }
9292
lazy_static = "1.4"
9393
assertables = "10"
9494
hex = "0.4.3"
95-
datafusion-functions-nested = { version = "53.1.0" }
95+
datafusion-functions-nested = { version = "54.0.0" }
9696

9797
[features]
9898
backtrace = ["datafusion/backtrace"]

‎native/core/src/debug/debug_batch_stream.rs‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
use std::any::Any;
1918
use std::fmt;
2019
use std::hash::{Hash, Hasher};
2120
use std::sync::Arc;
@@ -82,9 +81,6 @@ impl datafusion::physical_plan::ExecutionPlan for DebugExecutionDataStream {
8281
fn name(&self) -> &str {
8382
"DebugExecutionDataStream"
8483
}
85-
fn as_any(&self) -> &dyn std::any::Any {
86-
self
87-
}
8884
fn properties(&self) -> &Arc<datafusion::physical_plan::PlanProperties> {
8985
self.inner.properties()
9086
}
@@ -155,9 +151,6 @@ impl Hash for DebugExecutionDataPhyExpr {
155151
}
156152

157153
impl PhysicalExpr for DebugExecutionDataPhyExpr {
158-
fn as_any(&self) -> &dyn Any {
159-
self
160-
}
161154
fn data_type(&self, input_schema: &Schema) -> Result<DataType> {
162155
self.inner.data_type(input_schema)
163156
}

‎native/core/src/execution/expressions/arithmetic.rs‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ impl Hash for CheckedBinaryExpr {
7777
}
7878

7979
impl PhysicalExpr for CheckedBinaryExpr {
80-
fn as_any(&self) -> &dyn Any {
81-
self
82-
}
83-
8480
fn fmt_sql(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
8581
self.child.fmt_sql(f)
8682
}

‎native/core/src/execution/expressions/list_positions.rs‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
use std::any::Any;
1918
use std::fmt::{Display, Formatter};
2019
use std::hash::{Hash, Hasher};
2120
use std::sync::Arc;
@@ -68,10 +67,6 @@ impl Hash for ListPositionsExpr {
6867
}
6968

7069
impl PhysicalExpr for ListPositionsExpr {
71-
fn as_any(&self) -> &dyn Any {
72-
self
73-
}
74-
7570
fn fmt_sql(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
7671
Display::fmt(self, f)
7772
}

‎native/core/src/execution/expressions/strings.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl ExpressionBuilder for RlikeBuilder {
9191
let left = planner.create_expr(expr.left.as_ref().unwrap(), Arc::clone(&input_schema))?;
9292
let right = planner.create_expr(expr.right.as_ref().unwrap(), input_schema)?;
9393

94-
match right.as_any().downcast_ref::<Literal>().unwrap().value() {
94+
match right.downcast_ref::<Literal>().unwrap().value() {
9595
ScalarValue::Utf8(Some(pattern)) => Ok(Arc::new(RLike::try_new(left, pattern)?)),
9696
_ => Err(ExecutionError::GeneralError(
9797
"RLike only supports scalar patterns".to_string(),

‎native/core/src/execution/expressions/subquery.rs‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ use jni::{
2929
sys::{jboolean, jbyte, jint, jlong, jshort},
3030
};
3131
use std::{
32-
any::Any,
3332
fmt::{Display, Formatter},
3433
hash::Hash,
3534
sync::Arc,
@@ -63,10 +62,6 @@ impl Display for Subquery {
6362
}
6463

6564
impl PhysicalExpr for Subquery {
66-
fn as_any(&self) -> &dyn Any {
67-
self
68-
}
69-
7065
fn fmt_sql(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
7166
Display::fmt(self, f)
7267
}

‎native/core/src/execution/memory_pools/fair_pool.rs‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
// under the License.
1717

1818
use std::{
19-
fmt::{Debug, Formatter, Result as FmtResult},
19+
fmt::{Debug, Display, Formatter, Result as FmtResult},
2020
sync::Arc,
2121
};
2222

@@ -83,10 +83,25 @@ impl CometFairMemoryPool {
8383
}
8484
}
8585

86+
impl Display for CometFairMemoryPool {
87+
fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
88+
let state = self.state.lock();
89+
write!(
90+
f,
91+
"CometFairMemoryPool(pool_size={}, used={}, num={})",
92+
self.pool_size, state.used, state.num
93+
)
94+
}
95+
}
96+
8697
unsafe impl Send for CometFairMemoryPool {}
8798
unsafe impl Sync for CometFairMemoryPool {}
8899

89100
impl MemoryPool for CometFairMemoryPool {
101+
fn name(&self) -> &str {
102+
"CometFairMemoryPool"
103+
}
104+
90105
fn register(&self, _: &MemoryConsumer) {
91106
let mut state = self.state.lock();
92107
state.num = state

‎native/core/src/execution/memory_pools/logging_pool.rs‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ use datafusion::execution::memory_pool::{
1919
MemoryConsumer, MemoryLimit, MemoryPool, MemoryReservation,
2020
};
2121
use log::{info, warn};
22+
use std::fmt;
2223
use std::sync::Arc;
2324

2425
#[derive(Debug)]
@@ -27,6 +28,12 @@ pub(crate) struct LoggingMemoryPool {
2728
pool: Arc<dyn MemoryPool>,
2829
}
2930

31+
impl fmt::Display for LoggingMemoryPool {
32+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
33+
write!(f, "LoggingMemoryPool(task={})", self.task_attempt_id)
34+
}
35+
}
36+
3037
impl LoggingMemoryPool {
3138
pub fn new(task_attempt_id: u64, pool: Arc<dyn MemoryPool>) -> Self {
3239
Self {
@@ -37,6 +44,10 @@ impl LoggingMemoryPool {
3744
}
3845

3946
impl MemoryPool for LoggingMemoryPool {
47+
fn name(&self) -> &str {
48+
"LoggingMemoryPool"
49+
}
50+
4051
fn register(&self, consumer: &MemoryConsumer) {
4152
info!(
4253
"[Task {}] MemoryPool[{}].register()",

0 commit comments

Comments
 (0)