Skip to content

Commit

Permalink
[fix] removed Ballista stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
rdettai committed Sep 22, 2021
1 parent 833dafc commit 82d1763
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 38 deletions.
26 changes: 0 additions & 26 deletions ballista/rust/core/proto/ballista.proto
Original file line number Diff line number Diff line change
Expand Up @@ -943,30 +943,6 @@ message GetFileMetadataParams {
FileType file_type = 2;
}

message ParquetFormat {
// fields of datasource::format::parquet::ParquetFormat
}

message ListingConfig {
string extension = 1;
oneof format {
ParquetFormat parquet = 2;
// csv, json, ...
}
}

message GetSchemaParams {
string path = 1;
oneof provider_config {
ListingConfig listing = 2;
// delta, iceberg... (maybe replace oneof with something more exensible)
}
}

message GetSchemaResult {
Schema schema = 1;
}

message GetFileMetadataResult {
Schema schema = 1;
repeated FilePartitionMetadata partitions = 2;
Expand All @@ -980,8 +956,6 @@ service SchedulerGrpc {
// Executors must poll the scheduler for heartbeat and to receive tasks
rpc PollWork (PollWorkParams) returns (PollWorkResult) {}

rpc GetSchema (GetSchemaParams) returns (GetSchemaResult) {}

rpc GetFileMetadata (GetFileMetadataParams) returns (GetFileMetadataResult) {}

rpc ExecuteQuery (ExecuteQueryParams) returns (ExecuteQueryResult) {}
Expand Down
11 changes: 0 additions & 11 deletions ballista/rust/scheduler/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ pub mod planner;
#[cfg(feature = "sled")]
mod standalone;
pub mod state;
use ballista_core::serde::protobuf::{GetSchemaParams, GetSchemaResult};
#[cfg(feature = "sled")]
pub use standalone::new_standalone_scheduler;

Expand Down Expand Up @@ -269,16 +268,6 @@ impl SchedulerGrpc for SchedulerServer {
}
}

/// this service would replace get_file_metadata
async fn get_schema(
&self,
_request: Request<GetSchemaParams>,
) -> std::result::Result<Response<GetSchemaResult>, tonic::Status> {
// if GetSchemaParams contains a provider config of type ListingConfig
// use ListingOptions.infer_schema()
todo!()
}

async fn get_file_metadata(
&self,
request: Request<GetFileMetadataParams>,
Expand Down
2 changes: 1 addition & 1 deletion datafusion/src/datasource/file_format/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use futures::Stream;
/// A stream of String that can be used accross await calls
pub type StringStream = Pin<Box<dyn Stream<Item = String> + Send + Sync>>;

/// Convert a vec into a `StringStream`
/// Convert a vector into a stream
pub fn string_stream(strings: Vec<String>) -> StringStream {
Box::pin(futures::stream::iter(strings))
}
Expand Down

0 comments on commit 82d1763

Please sign in to comment.