Skip to content

Commit 850d6f1

Browse files
authored
chore: dependency updates (#19)
1 parent 90efa8c commit 850d6f1

File tree

11 files changed

+49
-46
lines changed

11 files changed

+49
-46
lines changed

Cargo.toml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,12 @@ rust-version = "1.85"
1313
version = "0.0.1"
1414

1515
[workspace.dependencies]
16-
delta_kernel = { version = "0.14.0", features = [
17-
"default-engine",
18-
"arrow",
16+
delta_kernel = { version = "0.15.1", features = [
17+
"default-engine-rustls",
18+
"arrow-55",
1919
"internal-api",
2020
] }
21-
# unitycatalog-client = { path = "../unitycatalog-rs/crates/client", features = [
22-
# "sharing",
23-
# ] }
21+
# unitycatalog-client = { path = "../unitycatalog-rs/crates/client" }
2422
# unitycatalog-common = { path = "../unitycatalog-rs/crates/common", default-features = false }
25-
unitycatalog-client = { git = "https://github.com/unitycatalog-incubator/unitycatalog-rs", rev = "68f0a4b25178f61bdbd4b8e4a1819bdc8f48a24c", features = [
26-
"sharing",
27-
] }
28-
unitycatalog-common = { git = "https://github.com/unitycatalog-incubator/unitycatalog-rs", rev = "68f0a4b25178f61bdbd4b8e4a1819bdc8f48a24c", default-features = false }
23+
unitycatalog-client = { git = "https://github.com/unitycatalog-incubator/unitycatalog-rs", rev = "02e948cd1ac3bcebc751fed52b29e90aa0152f36" }
24+
unitycatalog-common = { git = "https://github.com/unitycatalog-incubator/unitycatalog-rs", rev = "02e948cd1ac3bcebc751fed52b29e90aa0152f36", default-features = false }

crates/acceptance/src/data.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ use delta_kernel::arrow::compute::{
66
};
77
use delta_kernel::arrow::datatypes::{DataType, Schema};
88

9-
use delta_kernel::object_store::{ObjectStore, local::LocalFileSystem};
109
use delta_kernel::parquet::arrow::async_reader::{
1110
ParquetObjectReader, ParquetRecordBatchStreamBuilder,
1211
};
1312
use delta_kernel::snapshot::Snapshot;
1413
use delta_kernel::{DeltaResult, Engine, Error, engine::arrow_data::ArrowEngineData};
1514
use futures::{StreamExt, stream::TryStreamExt};
1615
use itertools::Itertools;
16+
use object_store::{ObjectStore, local::LocalFileSystem};
1717

1818
use crate::{TestCaseInfo, TestResult};
1919

crates/acceptance/src/meta.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ use std::fs::File;
33
use std::path::{Path, PathBuf};
44
use std::sync::Arc;
55

6-
use delta_kernel::object_store::{self, ObjectStore, local::LocalFileSystem};
76
use futures::stream::TryStreamExt;
7+
use object_store::{self, ObjectStore, local::LocalFileSystem};
88
use serde::{Deserialize, Serialize};
99
use url::Url;
1010

crates/datafusion/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ chrono = "0.4.40"
2424
dashmap = "6.0.1"
2525
futures = "0.3"
2626
itertools = "0.14"
27+
object_store = "0.12.3"
2728
parking_lot = "0.12"
2829
serde = "1.0"
2930
serde_json = "1.0"

crates/datafusion/src/engine/evaluation.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl DataFusionEvaluationHandler {
5252
fn evaluator(
5353
&self,
5454
schema: SchemaRef,
55-
expression: Expression,
55+
expression: Arc<Expression>,
5656
output_type: DataType,
5757
) -> Arc<DataFusionExpressionEvaluator> {
5858
let maybe_schema: Result<ArrowSchema, _> = schema.as_ref().try_into_arrow();
@@ -79,7 +79,7 @@ impl EvaluationHandler for DataFusionEvaluationHandler {
7979
fn new_expression_evaluator(
8080
&self,
8181
schema: SchemaRef,
82-
expression: Expression,
82+
expression: Arc<Expression>,
8383
output_type: DataType,
8484
) -> Arc<dyn ExpressionEvaluator> {
8585
self.evaluator(schema, expression, output_type)
@@ -88,11 +88,11 @@ impl EvaluationHandler for DataFusionEvaluationHandler {
8888
fn new_predicate_evaluator(
8989
&self,
9090
schema: SchemaRef,
91-
predicate: Predicate,
91+
predicate: Arc<Predicate>,
9292
) -> Arc<dyn PredicateEvaluator> {
9393
self.evaluator(
9494
schema,
95-
Expression::Predicate(Box::new(predicate)),
95+
Expression::Predicate(Box::new(predicate.as_ref().clone())).into(),
9696
DataType::BOOLEAN,
9797
)
9898
}
@@ -268,7 +268,7 @@ mod tests {
268268

269269
let evaluator = handler.new_expression_evaluator(
270270
input_schema,
271-
expr,
271+
expr.into(),
272272
DataType::Primitive(PrimitiveType::Integer),
273273
);
274274

@@ -305,7 +305,7 @@ mod tests {
305305
StructField::new("y", DataType::Primitive(PrimitiveType::String), true),
306306
])));
307307

308-
let evaluator = handler.new_expression_evaluator(input_schema, expr, output_type);
308+
let evaluator = handler.new_expression_evaluator(input_schema, expr.into(), output_type);
309309
let result = evaluator.evaluate(&data).unwrap();
310310
let engine_data = ArrowEngineData::try_from_engine_data(result).unwrap();
311311

@@ -332,7 +332,7 @@ mod tests {
332332

333333
let evaluator = handler.new_expression_evaluator(
334334
input_schema,
335-
expr,
335+
expr.into(),
336336
DataType::Primitive(PrimitiveType::Integer),
337337
);
338338

@@ -362,7 +362,7 @@ mod tests {
362362

363363
let evaluator = handler.new_expression_evaluator(
364364
input_schema,
365-
expr,
365+
expr.into(),
366366
DataType::Primitive(PrimitiveType::Integer),
367367
);
368368

crates/datafusion/src/engine/expressions/to_datafusion.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use std::sync::Arc;
2+
13
use datafusion::common::scalar::ScalarStructBuilder;
24
use datafusion::common::{DataFusionError, Result as DFResult, ScalarValue, not_impl_err};
35
use datafusion::functions::core::expr_ext::FieldAccessor;
@@ -28,6 +30,7 @@ pub(crate) fn to_datafusion_expr(expr: &Expression, output_type: &DataType) -> D
2830
Expression::Binary(expr) => binary_to_df(expr, output_type),
2931
Expression::Opaque(_) => not_impl_err!("Opaque expressions are not yet supported"),
3032
Expression::Unknown(_) => not_impl_err!("Unknown expressions are not yet supported"),
33+
Expression::Transform(_) => not_impl_err!("Transform expressions are not yet supported"),
3134
}
3235
}
3336

@@ -151,7 +154,7 @@ fn junction_to_df(junction: &JunctionPredicate, output_type: &DataType) -> DFRes
151154
}
152155
}
153156

154-
fn struct_to_df(fields: &[Expression], output_type: &DataType) -> DFResult<Expr> {
157+
fn struct_to_df(fields: &[Arc<Expression>], output_type: &DataType) -> DFResult<Expr> {
155158
let DataType::Struct(struct_type) = output_type else {
156159
return Err(DataFusionError::Execution(
157160
"expected struct output type".into(),
@@ -518,8 +521,8 @@ mod tests {
518521
#[test]
519522
fn test_struct_expression() {
520523
let expr = Expression::Struct(vec![
521-
Expression::Column(ColumnName::new(["a"])),
522-
Expression::Column(ColumnName::new(["b"])),
524+
Expression::Column(ColumnName::new(["a"])).into(),
525+
Expression::Column(ColumnName::new(["b"])).into(),
523526
]);
524527
let result = to_datafusion_expr(
525528
&expr,
@@ -797,12 +800,13 @@ mod tests {
797800

798801
// Test struct expressions with nested fields
799802
let expr = Expression::Struct(vec![
800-
Expression::Column(ColumnName::new(["a"])),
803+
Expression::Column(ColumnName::new(["a"])).into(),
801804
Expression::Binary(BinaryExpression {
802805
left: Box::new(Expression::Column(ColumnName::new(["b"]))),
803806
op: BinaryExpressionOp::Plus,
804807
right: Box::new(Expression::Column(ColumnName::new(["c"]))),
805-
}),
808+
})
809+
.into(),
806810
]);
807811
let result = to_datafusion_expr(
808812
&expr,

crates/datafusion/src/engine/file_format.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ use datafusion::physical_plan::execute_stream;
1212
use datafusion::physical_plan::union::UnionExec;
1313
use datafusion::physical_plan::{ExecutionPlan, PhysicalExpr};
1414
use datafusion_session::{Session, SessionStore};
15+
use delta_kernel::PredicateRef;
1516
use delta_kernel::engine::arrow_conversion::TryIntoArrow as _;
1617
use delta_kernel::engine::arrow_data::ArrowEngineData;
1718
use delta_kernel::engine::default::executor::TaskExecutor;
1819
use delta_kernel::engine::{parse_json as arrow_parse_json, to_json_bytes};
19-
use delta_kernel::object_store::{PutMode, path::Path};
2020
use delta_kernel::schema::SchemaRef;
2121
use delta_kernel::{
2222
DeltaResult, EngineData, Error as DeltaError, Expression, ExpressionRef,
2323
FileDataReadResultIterator, FileMeta, JsonHandler, ParquetHandler,
2424
};
25-
use delta_kernel::{PredicateRef, object_store};
2625
use futures::TryStreamExt;
2726
use futures::stream::{self, BoxStream, StreamExt};
27+
use object_store::{PutMode, path::Path};
2828
use parking_lot::RwLock;
2929
use tracing::warn;
3030
use url::Url;

crates/datafusion/src/engine/storage.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,8 @@ mod tests {
9292
use std::ops::Range;
9393

9494
use datafusion::prelude::SessionContext;
95-
use delta_kernel::{
96-
Engine,
97-
object_store::{ObjectStore, local::LocalFileSystem, memory::InMemory, path::Path},
98-
};
95+
use delta_kernel::Engine;
96+
use object_store::{ObjectStore, local::LocalFileSystem, memory::InMemory, path::Path};
9997
use rstest::*;
10098

10199
use super::*;

crates/datafusion/src/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ use datafusion_session::{Session, SessionStore};
88
use delta_kernel::engine::default::executor::tokio::{
99
TokioBackgroundExecutor, TokioMultiThreadExecutor,
1010
};
11-
use delta_kernel::object_store::ObjectStore;
1211
use delta_kernel::{Engine, Snapshot, Version};
12+
use object_store::ObjectStore;
1313
use parking_lot::RwLock;
1414
use tokio::runtime::{Handle, RuntimeFlavor};
1515
use unitycatalog_client::UnityCatalogClient;

crates/datafusion/src/sql/statements/catalogs.rs

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ impl CreateCatalogStatement {
2222
let name = self.name.to_string();
2323
let catalog_info = if let Some(location) = self.managed_location.as_ref() {
2424
// create a calog with explicit managed location
25-
client
26-
.create_catalog(&name, Some(location), self.comment.as_ref(), None)
25+
let request = client
26+
.create_catalog(&name)
27+
.with_storage_root(location.to_string())
28+
.with_comment(self.comment.clone());
29+
request
2730
.await
2831
.map_err(|e| DataFusionError::External(Box::new(e)))?
2932
} else if let Some(share) = self.using_share.as_ref() {
@@ -36,20 +39,20 @@ impl CreateCatalogStatement {
3639
}
3740
let provider_name = share.0[0].to_string();
3841
let share_name = share.0[1].to_string();
39-
client
40-
.create_sharing_catalog(
41-
&name,
42-
provider_name,
43-
share_name,
44-
self.comment.as_ref(),
45-
None,
46-
)
42+
let request = client
43+
.create_catalog(&name)
44+
.with_provider_name(provider_name)
45+
.with_share_name(share_name)
46+
.with_comment(self.comment.clone());
47+
request
4748
.await
4849
.map_err(|e| DataFusionError::External(Box::new(e)))?
4950
} else {
5051
// create a catalog with default settings
51-
client
52-
.create_catalog(&name, None::<String>, self.comment.as_ref(), None)
52+
let request = client
53+
.create_catalog(&name)
54+
.with_comment(self.comment.clone());
55+
request
5356
.await
5457
.map_err(|e| DataFusionError::External(Box::new(e)))?
5558
};
@@ -69,7 +72,8 @@ impl DropCatalogStatement {
6972
let name = self.name.to_string();
7073
client
7174
.catalog(&name)
72-
.delete(self.cascade)
75+
.delete()
76+
.with_force(self.cascade)
7377
.await
7478
.map_err(|e| DataFusionError::External(Box::new(e)))?;
7579
drop_response_to_batch(name, "Catalog", "success")

0 commit comments

Comments
 (0)