pitrou commented on code in PR #36067:
URL: https://github.com/apache/arrow/pull/36067#discussion_r1238359428


##########
cpp/src/arrow/compute/kernels/scalar_set_lookup.cc:
##########
@@ -36,16 +36,23 @@ namespace {
 
 template <typename Type>
 struct SetLookupState : public KernelState {
-  explicit SetLookupState(MemoryPool* pool) : lookup_table(pool, 0) {}
+  explicit SetLookupState(MemoryPool* pool) : lookup_table(pool, 0), 
memory_pool(pool) {}

Review Comment:
   Ok, but this makes an initial memory allocation for the lookup table which 
is immediately undone in `Init`.
   
   A possible way around that is to make `lookup_table` a 
`std::optional<MemoTable>`, to allow deferred initialization.
   



-- 
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

Reply via email to