adonis0147 commented on code in PR #8786:
URL: https://github.com/apache/incubator-doris/pull/8786#discussion_r845819989


##########
be/src/olap/field.h:
##########
@@ -278,7 +278,7 @@ class Field {
 
     FieldType type() const { return _type_info->type(); }
     FieldAggregationMethod aggregation() const { return 
_agg_info->agg_method(); }
-    const TypeInfo* type_info() const { return _type_info; }
+    const TypeInfo* type_info() const { return _type_info.get(); }

Review Comment:
   I agree that it is a potential risk which we should avoid. For now, the 
lifetime of objects holding the raw pointer of `TypeInfo` is shorter than the 
`Field` object due to they are created directly as members by the objects 
holding the `Field` object.



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