bkietz commented on code in PR #38252:
URL: https://github.com/apache/arrow/pull/38252#discussion_r1425674659
##########
cpp/src/arrow/array/validate.cc:
##########
@@ -454,9 +437,36 @@ struct ValidateArrayImpl {
return data.buffers[index] != nullptr && data.buffers[index]->address() !=
0;
}
- Status RecurseInto(const ArrayData& related_data) {
- ValidateArrayImpl impl{related_data, full_validation};
- return impl.Validate();
+ template <typename... FieldDescription>
+ Status RecurseIntoField(int field_index, const FieldDescription&...
description) {
+ const auto& related_data = *data.child_data[field_index];
+
+ return RecurseInto(related_data,
+
data.type->storage_type()->field(field_index)->nullable(),
+ description...);
Review Comment:
Nothing takes ownership of any of the arguments, so taking them by const ref
doesn't cause any copies. The reason not to use std::forward was just less
boilerplate, but I can add it if you'd prefer consistency
--
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]