imay commented on a change in pull request #2276: Use dynamic_pointer_cast when
cast shared_ptr<Base> to shared_ptr<Derived>
URL: https://github.com/apache/incubator-doris/pull/2276#discussion_r349518224
##########
File path: be/src/olap/rowset/beta_rowset.cpp
##########
@@ -60,7 +63,7 @@ OLAPStatus BetaRowset::do_load_once(bool use_cache) {
OLAPStatus BetaRowset::create_reader(RowsetReaderSharedPtr* result) {
RETURN_NOT_OK(load());
- result->reset(new
BetaRowsetReader(std::static_pointer_cast<BetaRowset>(shared_from_this())));
+ result->reset(new
BetaRowsetReader(std::dynamic_pointer_cast<BetaRowset>(shared_from_this())));
Review comment:
better to use static to better performance.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]