zanmato1984 commented on code in PR #41194:
URL: https://github.com/apache/arrow/pull/41194#discussion_r1567058125
##########
cpp/src/arrow/compute/row/encode_internal.h:
##########
@@ -111,7 +111,7 @@ class ARROW_EXPORT RowTableEncoder {
const std::vector<KeyColumnArray>& cols_in);
// Data initialized once, based on data types of key columns
- RowTableMetadata row_metadata_;
+ std::shared_ptr<RowTableMetadata> row_metadata_;
Review Comment:
I was suggesting a raw pointer here. `RowTableEncoder` shouldn't be involved
in (partly) managing the lifespan of the `RowTableMetadata`. Someone else,
e.g. `RowArray`, who holds `RowTableEncoder` and/or `RowTableImpl` instances
should also hold an instance of `RowTableMetadata`, whose lifespan is fully
managed by this "someone else".
--
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]