-
Notifications
You must be signed in to change notification settings - Fork 42
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
Conversation
crates/sqlexec/src/session.rs
Outdated
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; | ||
} | ||
_ => {} | ||
} | ||
} | ||
|
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
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))
.