sanjibansg commented on code in PR #12852: URL: https://github.com/apache/arrow/pull/12852#discussion_r864611814
########## cpp/src/arrow/engine/substrait/plan_internal.cc: ########## @@ -108,13 +108,23 @@ void SetElement(size_t i, const Element& element, std::vector<T>* vector) { } (*vector)[i] = static_cast<T>(element); } + +template <typename Element, typename key, typename value> +void SetMapElement(key i, const Element& element, std::unordered_map<key, value>* map) { + DCHECK_LE(i, 1 << 20); Review Comment: Refactored that code, and not currently using the `SetMapElement()` function, is this approach better? -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org