-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GH-36090: [C++] Add testing libraries for Acero & Datasets #36206
GH-36090: [C++] Add testing libraries for Acero & Datasets #36206
Conversation
…g test_util_internal each time
Thanks for opening a pull request! If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project. Then could you also rename the pull request title in the following format?
or
In the case of PARQUET issues on JIRA the title also supports:
See also: |
If you don't want a 'real' library, you could use a CMake object library, so that the object files for common sources are built once and then linked into each binary. |
Kou had suggested this as well. I started by just copy/pasting flight (but must've missed something as CI tests are trying to build it even when testing is off). I'll look into making it an object library to see if that's simpler. |
I assume I can just ignore |
Actually, it looks like we are already using object libraries (this is from the definition of add_arrow_lib):
I don't know if these requirements (e.g. XCode, WIN32) apply for these testing libraries or not but it seems we can't always use object libraries in all situations. |
I think that sets up an object library that gets linked into a shared and a static library. But ugh, I forgot about the dllimport/dllexport issues. That said...it shouldn't matter for test code only? There would be no import/export issue since it's all the same binary. |
Ah, ok.
That makes sense to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
We need CMake 3.11 or later to use an OBJECT library for target_link_libraries()
but it'll be done by GH-35921 soon.
|
Should I wait for #35921 before merging? |
We don't need to wait for #35921. |
Conbench analyzed the 6 benchmark runs on commit There were 4 benchmark results indicating a performance regression:
The full Conbench report has more details. |
Rationale for this change
The acero & datasets tests rely on some common sources. The current build includes those in every test executable as sources. This was a bit of a change introduced as we extracted acero into its own library. This causes those files to be built again and again and this caused an increase in build times.
This change creates test libraries for each of those modules. These test libraries include the common sources and are built once. These libraries can then be included in the tests. This avoids the duplicate builds.
What changes are included in this PR?
Changes to how common test sources are built and linked.
Are these changes tested?
Yes. These tests still run as part of the unit tests.
I'm not entirely sure if the cmake.in and pc.in files are tested or not as I don't know entirely how they factor into things. However, I believe these are only needed if users want to rely on these test libraries and I'm not sure how critical that is.
Are there any user-facing changes?
No.