Skip to content

Commit c664cab

Browse files
committed
crate core-executor
1 parent b8a7439 commit c664cab

File tree

25 files changed

+211
-557
lines changed

25 files changed

+211
-557
lines changed

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ debug = true
2323
codegen-units = 16
2424

2525
[workspace.dependencies]
26+
aws-config = { version = "1.5.17" }
27+
aws-credential-types = { version = "1.2.1", features = ["hardcoded-credentials"]}
28+
2629
jsonwebtoken = "9.3.1"
2730
chrono = { version = "0.4.41", default-features = false, features = ["serde", "clock"] }
2831
futures = { version = "0.3" }
@@ -34,6 +37,7 @@ url = "2.5"
3437
tokio = { version = "1", features = ["full"] }
3538
async-trait = { version = "0.1.84" }
3639
serde = { version = "1.0", features = ["derive"] }
40+
strum = { version = "0.26.3", features = ["derive"] }
3741
slatedb = { version = "0.6.1" }
3842
bytes = { version = "1.8.0" }
3943
snmalloc-rs = { version = "0.3" }

crates/core-executor/Cargo.toml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,48 @@ edition = "2024"
55
license-file.workspace = true
66

77
[dependencies]
8+
core-utils = { path = "../core-utils" }
9+
core-metastore = { path = "../core-metastore" }
10+
df-builtins = { path = "../df-builtins" }
11+
df-catalog = { path = "../df-catalog" }
12+
13+
async-trait = { workspace = true }
14+
aws-config = { workspace = true }
15+
aws-credential-types = { workspace = true }
16+
bytes = { workspace = true }
17+
chrono = { workspace = true }
18+
datafusion = { workspace = true }
19+
datafusion-common = { workspace = true }
20+
datafusion-doc = { workspace = true }
21+
datafusion-expr = { workspace = true }
22+
datafusion-functions-json = { workspace = true }
23+
datafusion-physical-plan = { workspace = true }
24+
datafusion_iceberg = { workspace = true }
25+
futures = { workspace = true }
26+
sqlparser = { git = "https://github.com/Embucket/datafusion-sqlparser-rs.git", rev = "ed416548dcfe4a73a3240bbf625fb9010a4925c8", features = [
27+
"visitor",
28+
] }
29+
iceberg-rust = { workspace = true }
30+
iceberg-s3tables-catalog = { workspace = true }
31+
32+
object_store = { workspace = true }
33+
regex = { version = "1.11.0" }
34+
snafu = { workspace = true }
35+
serde = { workspace = true }
36+
serde_json = { workspace = true }
37+
38+
strum = { workspace = true }
39+
tracing = { workspace = true }
40+
tracing-attributes = { workspace = true }
41+
tokio = { workspace = true }
42+
tokio-stream = "0.1.17"
43+
44+
url = { workspace = true }
45+
uuid = { workspace = true }
46+
47+
[dev-dependencies]
48+
bytes = { workspace = true }
49+
insta = { version = "1.42.0", features = ["yaml", "filters"] }
850

951
[lints]
1052
workspace = true

crates/runtime/src/execution/datafusion/error.rs renamed to crates/core-executor/src/datafusion/error.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ use snafu::prelude::*;
55
#[snafu(visibility(pub(crate)))]
66
pub enum SQLError {
77
#[snafu(display("Arrow error: {source}"))]
8-
Arrow { source: arrow::error::ArrowError },
8+
Arrow {
9+
source: datafusion::arrow::error::ArrowError,
10+
},
911

1012
#[snafu(display("DataFusion error: {source}"))]
1113
DataFusion { source: DataFusionError },

crates/runtime/src/execution/datafusion/mod.rs renamed to crates/core-executor/src/datafusion/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
//pub mod error;
33
pub mod analyzer;
44
pub mod error;
5-
pub mod functions;
65
pub mod planner;
76
pub mod type_planner;
87
pub mod visitors;
8+
9+
pub use df_builtins as functions;

crates/runtime/src/execution/datafusion/visitors/functions_rewriter.rs renamed to crates/core-executor/src/datafusion/visitors/functions_rewriter.rs

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,3 @@
1-
// Licensed to the Apache Software Foundation (ASF) under one
2-
// or more contributor license agreements. See the NOTICE file
3-
// distributed with this work for additional information
4-
// regarding copyright ownership. The ASF licenses this file
5-
// to you under the Apache License, Version 2.0 (the
6-
// "License"); you may not use this file except in compliance
7-
// with the License. You may obtain a copy of the License at
8-
//
9-
// http://www.apache.org/licenses/LICENSE-2.0
10-
//
11-
// Unless required by applicable law or agreed to in writing,
12-
// software distributed under the License is distributed on an
13-
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14-
// KIND, either express or implied. See the License for the
15-
// specific language governing permissions and limitations
16-
// under the License.
17-
18-
// Licensed to the Apache Software Foundation (ASF) under one
19-
// or more contributor license agreements. See the NOTICE file
20-
// distributed with this work for additional information
21-
// regarding copyright ownership. The ASF licenses this file
22-
// to you under the Apache License, Version 2.0 (the
23-
// "License"); you may not use this file except in compliance
24-
// with the License. You may obtain a copy of the License at
25-
//
26-
// http://www.apache.org/licenses/LICENSE-2.0
27-
//
28-
// Unless required by applicable law or agreed to in writing,
29-
// software distributed under the License is distributed on an
30-
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
31-
// KIND, either express or implied. See the License for the
32-
// specific language governing permissions and limitations
33-
// under the License.
34-
351
use datafusion_expr::sqlparser::ast::VisitMut;
362
use datafusion_expr::sqlparser::ast::{
373
Expr, FunctionArg, FunctionArgExpr, FunctionArgumentList, FunctionArguments, Ident, ObjectName,
@@ -46,7 +12,7 @@ impl VisitorMut for FunctionsRewriter {
4612
type Break = ();
4713

4814
fn post_visit_expr(&mut self, expr: &mut Expr) -> std::ops::ControlFlow<Self::Break> {
49-
if let Expr::Function(ref mut func) = expr {
15+
if let Expr::Function(func) = expr {
5016
let func_name_string = func.name.clone().to_string().to_lowercase();
5117
let func_name = func_name_string.as_str();
5218
let args = &mut func.args;

crates/runtime/src/execution/datafusion/visitors/json_element.rs renamed to crates/core-executor/src/datafusion/visitors/json_element.rs

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,3 @@
1-
// Licensed to the Apache Software Foundation (ASF) under one
2-
// or more contributor license agreements. See the NOTICE file
3-
// distributed with this work for additional information
4-
// regarding copyright ownership. The ASF licenses this file
5-
// to you under the Apache License, Version 2.0 (the
6-
// "License"); you may not use this file except in compliance
7-
// with the License. You may obtain a copy of the License at
8-
//
9-
// http://www.apache.org/licenses/LICENSE-2.0
10-
//
11-
// Unless required by applicable law or agreed to in writing,
12-
// software distributed under the License is distributed on an
13-
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14-
// KIND, either express or implied. See the License for the
15-
// specific language governing permissions and limitations
16-
// under the License.
17-
18-
// Licensed to the Apache Software Foundation (ASF) under one
19-
// or more contributor license agreements. See the NOTICE file
20-
// distributed with this work for additional information
21-
// regarding copyright ownership. The ASF licenses this file
22-
// to you under the Apache License, Version 2.0 (the
23-
// "License"); you may not use this file except in compliance
24-
// with the License. You may obtain a copy of the License at
25-
//
26-
// http://www.apache.org/licenses/LICENSE-2.0
27-
//
28-
// Unless required by applicable law or agreed to in writing,
29-
// software distributed under the License is distributed on an
30-
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
31-
// KIND, either express or implied. See the License for the
32-
// specific language governing permissions and limitations
33-
// under the License.
34-
351
use datafusion_expr::sqlparser::ast::VisitMut;
362
use datafusion_expr::sqlparser::ast::{
373
Expr as ASTExpr, Function, FunctionArg, FunctionArgExpr, FunctionArgumentList,
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
//pub mod analyzer;
2+
//pub mod error;
3+
pub mod functions_rewriter;
4+
pub mod json_element;

0 commit comments

Comments
 (0)