avantgardnerio commented on code in PR #93:
URL: https://github.com/apache/arrow-ballista/pull/93#discussion_r929070337


##########
ballista/rust/scheduler/src/flight_sql.rs:
##########
@@ -0,0 +1,402 @@
+use std::collections::HashMap;
+use std::sync::{Arc, Mutex};
+use std::time::Duration;
+use arrow_flight::{FlightData, FlightDescriptor, FlightEndpoint, FlightInfo, 
Location, Ticket};
+use arrow_flight::flight_descriptor::DescriptorType;
+use arrow_flight::flight_service_server::FlightService;
+use arrow_flight::sql::{ActionClosePreparedStatementRequest, 
ActionCreatePreparedStatementRequest, ActionCreatePreparedStatementResult, 
CommandGetCatalogs, CommandGetCrossReference, CommandGetDbSchemas, 
CommandGetExportedKeys, CommandGetImportedKeys, CommandGetPrimaryKeys, 
CommandGetSqlInfo, CommandGetTables, CommandGetTableTypes, 
CommandPreparedStatementQuery, CommandPreparedStatementUpdate, 
CommandStatementQuery, CommandStatementUpdate, SqlInfo, TicketStatementQuery};
+use arrow_flight::sql::server::FlightSqlService;
+use log::{debug, error};
+use tonic::{Response, Status, Streaming};
+
+use crate::scheduler_server::SchedulerServer;
+use datafusion_proto::protobuf::LogicalPlanNode;
+use ballista_core::{
+    serde::protobuf::{PhysicalPlanNode},
+};
+use ballista_core::config::BallistaConfig;
+use arrow_flight::SchemaAsIpc;
+use datafusion::arrow;
+use datafusion::arrow::datatypes::Schema;
+use datafusion::arrow::ipc::writer::{IpcDataGenerator, IpcWriteOptions};
+use datafusion::logical_expr::LogicalPlan;
+use tokio::time::sleep;
+use uuid::{Uuid};
+use crate::scheduler_server::event::QueryStageSchedulerEvent;
+use ballista_core::serde::protobuf::job_status;
+use ballista_core::serde::protobuf::JobStatus;
+use ballista_core::serde::protobuf;
+use prost::Message;
+
+#[derive(Clone)]
+pub struct FlightSqlServiceImpl {
+    server: SchedulerServer<LogicalPlanNode, PhysicalPlanNode>,
+    statements: Arc<Mutex<HashMap<Uuid, LogicalPlan>>>,

Review Comment:
   It looks like I can store things trivially in `etcd` (or whatever backing 
store) using `server.state.session_manager.state`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to