jsjtxietian commented on code in PR #36915:
URL: https://github.com/apache/arrow/pull/36915#discussion_r1287316244
##########
cpp/src/arrow/type.cc:
##########
@@ -2090,17 +2090,39 @@ Status SchemaBuilder::AreCompatible(const
std::vector<std::shared_ptr<Schema>>&
return Merge(schemas, policy).status();
}
+std::vector<std::shared_ptr<Field>> make_fields(
+ std::initializer_list<std::pair<std::string, std::shared_ptr<DataType>>>
init_list) {
+ std::vector<std::shared_ptr<Field>> fields;
+ fields.reserve(init_list.size());
+ for (const auto& [name, type] : init_list) {
+ fields.push_back(field(name, type));
+ }
Review Comment:
I will take a look which one is better using a similar demo at compiler
explorer tomorrow.
--
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]