0AyanamiRei commented on code in PR #51760:
URL: https://github.com/apache/doris/pull/51760#discussion_r2524613629
##########
be/src/runtime/load_stream_writer.cpp:
##########
@@ -93,13 +95,38 @@ Status LoadStreamWriter::init() {
{ return Status::InternalError("fault injection"); });
RETURN_IF_ERROR(_rowset_builder->init());
_rowset_writer = _rowset_builder->rowset_writer();
+
+ auto tablet_res = ExecEnv::get_tablet(_req.tablet_id);
Review Comment:
u are absolutely right!
However, personally, for variables that are only used within an if
statement, I would adopt this approach:
`if (auto tablet_res = ExecEnv::get_tablet(_req.tablet_id);
tablet_res.has_value()) {...}`
if u think so, u can rewrite it~
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]