imay commented on a change in pull request #1527: Expose data 
pruned-filter-scan ability
URL: https://github.com/apache/incubator-doris/pull/1527#discussion_r308118834
 
 

 ##########
 File path: be/src/runtime/fragment_mgr.cpp
 ##########
 @@ -547,5 +551,109 @@ void FragmentMgr::debug(std::stringstream& ss) {
     }
 }
 
+/*
+ * 1. resolve opaqued_query_plan to thrift structure
+ * 2. build TExecPlanFragmentParams
+ */
+Status FragmentMgr::exec_external_plan_fragment(const TScanOpenParams& params, 
const TUniqueId& fragment_instance_id, std::vector<TScanColumnDesc>& 
selected_columns) {
+    std::string opaqued_query_plan = params.opaqued_query_plan;
+    std::string query_plan_info;
+    // base64 decode query plan
+    if (!base64_decode(opaqued_query_plan, &query_plan_info)) {
+        LOG(ERROR) << "open context error: base64_decode decode 
opaqued_query_plan failure";
+        std::stringstream msg;
+        msg << "query_plan_info: " << query_plan_info << " validate error, 
should not be modified after returned Doris FE processed";
+        return Status::InvalidArgument(msg.str());
+    }
+    TQueryPlanInfo t_query_plan_info;
+    const uint8_t* buf = (const uint8_t*)query_plan_info.data();
+    uint32_t len = query_plan_info.size();
+    // deserialize TQueryPlanInfo
+    auto st = deserialize_thrift_msg(buf, &len, false, &t_query_plan_info);
+    if (!st.ok()) {
+        LOG(ERROR) << "open context error: deserialize TQueryPlanInfo failure";
 
 Review comment:
   WARNING

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@doris.apache.org
For additional commands, e-mail: dev-h...@doris.apache.org

Reply via email to