mapleFU commented on code in PR #43760:
URL: https://github.com/apache/arrow/pull/43760#discussion_r1722944349
##########
cpp/src/arrow/compute/light_array_internal.cc:
##########
@@ -323,8 +322,7 @@ Status ResizableArrayData::ResizeFixedLengthBuffers(int
num_rows_new) {
}
Status ResizableArrayData::ResizeVaryingLengthBuffer() {
- KeyColumnMetadata column_metadata;
- column_metadata = ColumnMetadataFromDataType(data_type_).ValueOrDie();
+ KeyColumnMetadata column_metadata =
ColumnMetadataFromDataType(data_type_).ValueOrDie();
Review Comment:
> Why not use ARROW_ASSIGN_OR_RAISE? We are able to return a Status here.
I'm new to this code, when I'm reading this code I found the Join will
gurantees the type is safe from `ColumnMetadataFromDataType`.
> Also, it seems ColumnMetadataFromDataType(data_type_) is being called from
multiple methods. Why is the result not stored somewhere on the class?
I don't know :-( But this metadata is light weight, just a working around
for data_type_, whether caching this is both ok for me
--
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]