houqp commented on a change in pull request #1677:
URL: https://github.com/apache/arrow-datafusion/pull/1677#discussion_r798871728



##########
File path: ballista/rust/core/src/execution_plans/distributed_query.rs
##########
@@ -112,12 +134,24 @@ impl ExecutionPlan for DistributedQueryExec {
 
         let schema: Schema = self.plan.schema().as_ref().clone().into();
 
+        let mut buf: Vec<u8> = vec![];
+        let plan_message = T::try_from_logical_plan(&self.plan).map_err(|e| {
+            DataFusionError::Internal(format!(
+                "failed to serialize logical plan: {:?}",
+                e
+            ))
+        })?;
+        plan_message.try_encode(&mut buf).map_err(|e| {
+            DataFusionError::Execution(format!("failed to encode logical plan: 
{:?}", e))
+        })?;
+
         let job_id = scheduler
             .execute_query(ExecuteQueryParams {
                 query: Some(Query::LogicalPlan(
-                    (&self.plan)
-                        .try_into()
-                        .map_err(|e| 
DataFusionError::Execution(format!("{:?}", e)))?,
+                    buf
+                    // (&self.plan)
+                    //     .try_into()
+                    //     .map_err(|e| 
DataFusionError::Execution(format!("{:?}", e)))?,

Review comment:
       can be deleted?

##########
File path: ballista/rust/scheduler/src/lib.rs
##########
@@ -722,33 +746,38 @@ impl SchedulerGrpc for SchedulerServer {
     ) -> std::result::Result<Response<ExecuteQueryResult>, tonic::Status> {
         if let ExecuteQueryParams {
             query: Some(query),
-            settings,
+            settings: _,
         } = request.into_inner()
         {
             // parse config
-            let mut config_builder = BallistaConfig::builder();
-            for kv_pair in &settings {
-                config_builder = config_builder.set(&kv_pair.key, 
&kv_pair.value);
-            }
-            let config = config_builder.build().map_err(|e| {
-                let msg = format!("Could not parse configs: {}", e);
-                error!("{}", msg);
-                tonic::Status::internal(msg)
-            })?;
+            // let mut config_builder = BallistaConfig::builder();
+            // for kv_pair in &settings {
+            //     config_builder = config_builder.set(&kv_pair.key, 
&kv_pair.value);
+            // }
+            // let config = config_builder.build().map_err(|e| {
+            //     let msg = format!("Could not parse configs: {}", e);
+            //     error!("{}", msg);
+            //     tonic::Status::internal(msg)
+            // })?;

Review comment:
       can be removed?

##########
File path: ballista/rust/scheduler/src/lib.rs
##########
@@ -722,33 +765,38 @@ impl SchedulerGrpc for SchedulerServer {
     ) -> std::result::Result<Response<ExecuteQueryResult>, tonic::Status> {
         if let ExecuteQueryParams {
             query: Some(query),
-            settings,
+            settings: _,
         } = request.into_inner()
         {
             // parse config
-            let mut config_builder = BallistaConfig::builder();
-            for kv_pair in &settings {
-                config_builder = config_builder.set(&kv_pair.key, 
&kv_pair.value);
-            }
-            let config = config_builder.build().map_err(|e| {
-                let msg = format!("Could not parse configs: {}", e);
-                error!("{}", msg);
-                tonic::Status::internal(msg)
-            })?;
+            // let mut config_builder = BallistaConfig::builder();
+            // for kv_pair in &settings {
+            //     config_builder = config_builder.set(&kv_pair.key, 
&kv_pair.value);
+            // }
+            // let config = config_builder.build().map_err(|e| {
+            //     let msg = format!("Could not parse configs: {}", e);
+            //     error!("{}", msg);
+            //     tonic::Status::internal(msg)
+            // })?;
 
             let plan = match query {
-                Query::LogicalPlan(logical_plan) => {
+                Query::LogicalPlan(message) => {
                     // parse protobuf
-                    (&logical_plan).try_into().map_err(|e| {
-                        let msg = format!("Could not parse logical plan 
protobuf: {}", e);
-                        error!("{}", msg);
-                        tonic::Status::internal(msg)
-                    })?
+                    // let ctx = create_datafusion_context(&config);

Review comment:
       left over comment?




-- 
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