zanmato1984 commented on issue #36246:
URL: https://github.com/apache/arrow/issues/36246#issuecomment-1866668406

   > > So I just wanted to make sure that you were suggesting we should keep 
`function.h` in `compute/api_xxx.h` rather than `compute/api.h`.
   > 
   > We can just keep it in `compute/api.h` IMHO. That said, _if we make 
`function.h` cheap enough to include_, then we can also keep in 
`compute/api_xxx.h`.
   
   So if we can't make `function.h` cheap enough, then we don't need to keep it 
in `compute/api_xxx.h`? What about the legacy user code that may fail 
compiling, as illustrated below.
   
   > > > the declarations in function.h such as CallFunction() will not be in 
api_aggregate.h.
   > > 
   > > 
   > > Seems `api_scalar.h` or other would have the same problem here?
   > 
   > Right, they essentially have the same problem. When user code is like 
below:
   > 
   > ```
   > #include <arrow/compute/api_scalar.h>
   > // ...
   > arrow::compute::CallFunction("xxx", {array_a, array_b}); // Unknown 
function
   > // ...
   > ```
   > 
   > However note that if we include `compute/api.h` instead, or include 
`compute/api.h` and `compute/api_xxx.h` both, it will be fine:
   > 
   > ```
   > #include <arrow/compute/api.h>
   > // ...
   > arrow::compute::CallFunction("xxx", {array_a, array_b}); // OK
   > // ...
   > ```
   
   Forgive my ignorance about this, I'm not sure if this is an acceptable 
compatibility change. I appreciate any clearance. Thanks.


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