ZhangHuiGui commented on code in PR #41925:
URL: https://github.com/apache/arrow/pull/41925#discussion_r1628700236


##########
cpp/src/arrow/compute/expression_test.cc:
##########
@@ -909,6 +909,39 @@ TEST(Expression, ExecuteCallWithNoArguments) {
   EXPECT_EQ(actual.length(), kCount);
 }
 
+TEST(Expression, ExecuteChunkedArray) {

Review Comment:
   > The implication from `COMPUTED_NO_PREALLOCATE` should be regarded as an 
unstable internal implementation choice
   Ah, in comparison, I don’t quite understand the meaning of the phrase 
`unstable internal implementation choice`.
   
   Some functions have kernel output types of nested-types or dictionary-type, 
so they cannot pre-allocate validity-bitmap before actual execution, and can 
only set `NullHandling` to `COMPUTED_NO_PREALLOCATE`.
   
   In this case, if the input of this function is chunked-array, according to 
the existing logic of `ScalarExecutor`, the output nested-types or 
dictionary-type must be chunked-array.
   
   1. `preallocating_all_buffers_` must be `false` in this kind of kernel's 
execute path and go into `ExecuteNonSpans`
   2. `ExecuteNonSpans` will emplace the every chunk's array-data result input 
listener.
    
https://github.com/apache/arrow/blob/9ee6ea701e20d1b47934f977d87811624061d597/cpp/src/arrow/compute/exec.cc#L897
   3. Listener have saved multi-arrays and return a chunked array in below logic
    
https://github.com/apache/arrow/blob/9ee6ea701e20d1b47934f977d87811624061d597/cpp/src/arrow/compute/exec.cc#L814-L824
   
   
   If If ExecBatch supports chunked-array, should such output also be tested 
(to ensure that the expression system works properly in this scenario)?
   
   



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