Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proto serialize logical plans #1528

Merged
merged 8 commits into from
Aug 10, 2023
Merged

Conversation

universalmind303
Copy link
Contributor

this uses the datafusion Extension as a means to transmit the custom nodes.

In the process, we convert our logicalPlan to datafusion extension nodes.

for example
LogicalPlan(DDL(CreateTable)) -> DfLogicalPlan(Extension(CreateTable)).

Comment on lines 239 to 248
if let DfLogicalPlan::Extension(extension) = &plan {
match extension.node.name() {
"CreateTable" => {
let create_table = extension.node.as_any().downcast_ref::<CreateTable>();
return self.create_table(create_table.unwrap().clone()).await;
}
_ => {}
}
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we want to handle the extensions using our session context, not datafusions, so we need to handle those cases here.

@universalmind303 universalmind303 marked this pull request as ready for review August 10, 2023 16:45
@universalmind303 universalmind303 changed the title wip: proto serialize logical plans proto serialize logical plans Aug 10, 2023
Copy link
Member

@scsmithr scsmithr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, definitely feels like something we can work off of.

crates/sqlexec/Cargo.toml Outdated Show resolved Hide resolved
@universalmind303 universalmind303 merged commit c59e446 into main Aug 10, 2023
@universalmind303 universalmind303 deleted the universalmind303/proto-plans branch August 10, 2023 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants