pitrou commented on a change in pull request #12089:
URL: https://github.com/apache/arrow/pull/12089#discussion_r781228567



##########
File path: cpp/src/arrow/compute/exec.cc
##########
@@ -697,7 +771,18 @@ class ScalarExecutor : public 
KernelExecutorImpl<ScalarKernel> {
       }
     }
 
+    // To check whether the kernel allocated new Buffers,
+    // insert all the preallocated ones into a set
+    std::unordered_set<std::shared_ptr<Buffer>> pre_buffers;

Review comment:
       I'm not sure how we want to handle this feature at all, but we 
definitely don't want to run those checks unconditionally, unless they're 
extremely trivial. Perhaps this can be enabled only on debug builds? (`#ifndef 
_NDEBUG`, for example)
   
   cc @lidavidm 

##########
File path: cpp/src/arrow/compute/api_scalar.cc
##########
@@ -732,6 +732,11 @@ Result<Datum> IsNull(const Datum& arg, NullOptions 
options, ExecContext* ctx) {
   return CallFunction("is_null", {arg}, &options, ctx);
 }
 
+Result<Datum> Misbehave(const Datum& cond, const Datum& if_true, const Datum& 
if_false,
+                        ExecContext* ctx) {
+  return CallFunction("misbehave", {}, ctx);
+}

Review comment:
       These should not be added in the public APIs. Instead, these functions 
should only exist in the corresponding test file, IMHO.




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


Reply via email to