Lancern opened a new issue, #48062:
URL: https://github.com/apache/arrow/issues/48062

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   In function `arrow::compute::MakeExecBatch` it checks for the input Datum's 
type id:
   
   
https://github.com/apache/arrow/blob/5eaf553bfc7aa639fd67bd622b6b808e71fbba39/cpp/src/arrow/compute/expression.cc#L690
   
   `Datum::type()` can return null pointers. This will happen when the Datum is 
constructed from a record batch or a table:
   
   
https://github.com/apache/arrow/blob/5eaf553bfc7aa639fd67bd622b6b808e71fbba39/cpp/src/arrow/datum.cc#L76-L88
   
   However, the `MakeExecBatch` function does not check whether the datum is a 
table before `Datum::type()` is used. This leads to a null pointer dereference 
when the `id()` function is called.
   
   I suggest we additionally check that `Datum::type()` does not return a null 
pointer before calling `id()` on it.
   
   ### Component(s)
   
   C++


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