Skip to content

Commit

Permalink
chore: Remove logical plan serialization (#2244)
Browse files Browse the repository at this point in the history
Removes unused code related to logical plan serialization.
  • Loading branch information
scsmithr authored Dec 11, 2023
1 parent a2d1c5f commit 3dfdeeb
Show file tree
Hide file tree
Showing 37 changed files with 53 additions and 1,760 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
use super::*;
use prost::{Message, Oneof};

#[derive(Clone, PartialEq, Message)]
pub struct CopyTo {
#[prost(message, tag = "1")]
pub source: Option<LogicalPlanNode>,
#[prost(message, tag = "2")]
pub dest: Option<CopyToDestinationOptions>,
#[prost(message, tag = "3")]
pub format: Option<CopyToFormatOptions>,
}
use crate::ProtoConvError;

#[derive(Clone, PartialEq, Message)]
pub struct CopyToDestinationOptions {
#[prost(oneof = "CopyToDestinationOptionsEnum", tags = "1, 2, 3, 4")]
pub copy_to_destination_options_enum: Option<CopyToDestinationOptionsEnum>,
}

#[derive(Clone, PartialEq, Oneof)]
pub enum CopyToDestinationOptionsEnum {
#[prost(message, tag = "1")]
Expand All @@ -32,6 +25,7 @@ pub struct CopyToDestinationOptionsLocal {
#[prost(string, tag = "1")]
pub location: String,
}

#[derive(Clone, PartialEq, Message)]
pub struct CopyToDestinationOptionsGcs {
#[prost(string, optional, tag = "1")]
Expand Down Expand Up @@ -71,6 +65,7 @@ pub struct CopyToFormatOptions {
#[prost(oneof = "CopyToFormatOptionsEnum", tags = "1, 2, 3")]
pub copy_to_format_options_enum: Option<CopyToFormatOptionsEnum>,
}

#[derive(Clone, PartialEq, Oneof)]
pub enum CopyToFormatOptionsEnum {
#[prost(message, tag = "1")]
Expand All @@ -88,6 +83,7 @@ pub struct CopyToFormatOptionsCsv {
#[prost(bool, tag = "2")]
pub header: bool,
}

#[derive(Clone, PartialEq, Message)]
pub struct CopyToFormatOptionsJson {
#[prost(bool, tag = "1")]
Expand Down
205 changes: 0 additions & 205 deletions crates/protogen/src/sqlexec/logical_plan.rs

This file was deleted.

3 changes: 2 additions & 1 deletion crates/protogen/src/sqlexec/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pub mod common;
pub mod logical_plan;
pub mod physical_plan;
pub mod table_provider;

mod copy_to;
2 changes: 1 addition & 1 deletion crates/protogen/src/sqlexec/physical_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use prost::{Message, Oneof};

use super::{
common::{FullObjectReference, FullSchemaReference},
logical_plan::{CopyToDestinationOptions, CopyToFormatOptions},
copy_to::{CopyToDestinationOptions, CopyToFormatOptions},
};

#[derive(Clone, PartialEq, Message)]
Expand Down
2 changes: 1 addition & 1 deletion crates/sqlexec/src/context/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl RemoteSessionContext {
/// Returns the extension codec used for serializing and deserializing data
/// over RPCs.
pub fn extension_codec(&self) -> GlareDBExtensionCodec<'_> {
GlareDBExtensionCodec::new_decoder(&self.provider_cache, self.df_ctx.runtime_env())
GlareDBExtensionCodec::new_decoder(&self.provider_cache)
}

fn catalog_mutator(&self) -> Arc<CatalogMutator> {
Expand Down
Loading

0 comments on commit 3dfdeeb

Please sign in to comment.