platoneko commented on code in PR #31650:
URL: https://github.com/apache/doris/pull/31650#discussion_r1512158100


##########
be/src/service/point_query_executor.cpp:
##########
@@ -191,14 +194,16 @@ Status PointQueryExecutor::init(const 
PTabletKeyLookupRequest* request,
             RETURN_IF_ERROR(reusable_ptr->init(t_desc_tbl, 
t_output_exprs.exprs, 1));
         }
     }
-    // TODO(plat1ko): CloudStorageEngine
-    _tablet = 
ExecEnv::GetInstance()->storage_engine().to_local().tablet_manager()->get_tablet(
-            request->tablet_id());
+    auto res = ExecEnv::get_tablet(request->tablet_id());
+    _tablet = !res.has_value() ? nullptr : 
std::dynamic_pointer_cast<BaseTablet>(res.value());

Review Comment:
   这里不需要对指针类型进行转换,另外可以使用 `DORIS_TRY` 宏简化写法



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to