apache / arrow

Apache Arrow is the universal columnar format and multi-language toolbox for fast data interchange and in-memory analytics
https://arrow.apache.org/
Apache License 2.0
14.64k stars 3.56k forks source link

GH-44563: [C++] Add missing ARROW_IPC dependency to ARROW_COMPUTE #44684

Open kou opened 1 week ago

kou commented 1 week ago

Rationale for this change

The compute module uses the IPC module features for option serialization.

What changes are included in this PR?

Enable the IPC module when the compute module is enabled.

Are these changes tested?

Yes.

Are there any user-facing changes?

Yes.

github-actions[bot] commented 1 week ago

:warning: GitHub issue #44563 has been automatically assigned in GitHub to PR creator.

kou commented 1 week ago

@jleibs Could you try this?

mapleFU commented 1 week ago

Just curious how did parquet support dependency to ARROW_IPC?

kou commented 1 week ago

It also uses the same approach:

https://github.com/apache/arrow/blob/95b7181307fe133e8c84a0c0be2856ee15348b8e/cpp/cmake_modules/DefineOptions.cmake#L389-L393

jleibs commented 1 week ago

This does not fix my issues. I am explicitly setting:

-DARROW_COMPUTE=OFF

so the dependency on ARROW_IPC is irrelevant.

The issue is that function_internal.cc is included in the build even if ARROW_COMPUTE is disabled.

jleibs commented 1 week ago

See here: https://github.com/apache/arrow/blob/95b7181307fe133e8c84a0c0be2856ee15348b8e/cpp/src/arrow/CMakeLists.txt#L719C5-L799

In short, there is a baseline level of compute functionality included regardless of the ARROW_COMPUTE flag,

As far as I can tell ARROW_COMPUTE falg should actually be called something like ARROW_COMPUTE_EXTRA.