Skip to content

Commit a3a0100

Browse files
authored
[AURON #1833] Refactor from_proto.rs to planner.rs (#1843)
<!-- - Start the PR title with the related issue ID, e.g. '[AURON #XXXX] Short summary...'. --> # Which issue does this PR close? Closes #1833 # Rationale for this change Refactor planning logic from `from_proto.rs` into `planner.rs` and introduce `PhysicalPlanner` for converting Spark query plans to DataFusion physical plans, adding support for passing a task-level partition_id during conversion. This partition_id will be used by upcoming implementations of nondeterministic functions. # What changes are included in this PR? # Are there any user-facing changes? # How was this patch tested?
1 parent 6015ff9 commit a3a0100

File tree

12 files changed

+424
-379
lines changed

12 files changed

+424
-379
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ members = [
2323
"native-engine/datafusion-ext-plans",
2424
"native-engine/auron",
2525
"native-engine/auron-jni-bridge",
26-
"native-engine/auron-serde",
26+
"native-engine/auron-planner",
2727
"native-engine/auron-memmgr",
2828
]
2929

@@ -48,7 +48,7 @@ overflow-checks = false
4848
[workspace.dependencies]
4949
auron = { path = "./native-engine/auron" }
5050
auron-jni-bridge = { path = "./native-engine/auron-jni-bridge" }
51-
auron-serde = { path = "./native-engine/auron-serde" }
51+
auron-planner = { path = "./native-engine/auron-planner" }
5252
auron-memmgr = { path = "./native-engine/auron-memmgr" }
5353
datafusion-ext-commons = { path = "./native-engine/datafusion-ext-commons" }
5454
datafusion-ext-exprs = { path = "./native-engine/datafusion-ext-exprs" }

dev/mvn-build-helper/proto/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<version>0.6.1</version>
4949
<extensions>true</extensions>
5050
<configuration>
51-
<protoSourceRoot>../../../native-engine/auron-serde/proto</protoSourceRoot>
51+
<protoSourceRoot>../../../native-engine/auron-planner/proto</protoSourceRoot>
5252
<protocArtifact>com.google.protobuf:protoc:${protobufVersion}:exe:${os.detected.classifier}</protocArtifact>
5353
<checkStaleness>true</checkStaleness>
5454
<clearOutputDirectory>true</clearOutputDirectory>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#
1717

1818
[package]
19-
name = "auron-serde"
19+
name = "auron-planner"
2020
version = "0.1.0"
2121
edition = "2024"
2222

File renamed without changes.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub mod protobuf {
2828
}
2929

3030
pub mod error;
31-
pub mod from_proto;
31+
pub mod planner;
3232

3333
pub(crate) fn proto_error<S: Into<String>>(message: S) -> PlanSerDeError {
3434
PlanSerDeError::General(message.into())
@@ -58,9 +58,9 @@ macro_rules! into_required {
5858

5959
#[macro_export]
6060
macro_rules! convert_box_required {
61-
($PB:expr) => {{
61+
($self:expr, $PB:expr) => {{
6262
if let Some(field) = $PB.as_ref() {
63-
field.as_ref().try_into()
63+
$self.create_plan(field.as_ref())
6464
} else {
6565
Err(proto_error("Missing required field in protobuf"))
6666
}

native-engine/auron-serde/src/from_proto.rs renamed to native-engine/auron-planner/src/planner.rs

Lines changed: 405 additions & 365 deletions
Large diffs are not rendered by default.

native-engine/auron/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ http-service = []
3434
arrow = { workspace = true }
3535
auron-jni-bridge = { workspace = true }
3636
auron-memmgr = { workspace = true }
37-
auron-serde = { workspace = true }
37+
auron-planner = { workspace = true }
3838
datafusion = { workspace = true }
3939
datafusion-ext-commons = { workspace = true }
4040
datafusion-ext-plans = { workspace = true }

0 commit comments

Comments
 (0)