Skip to content

GH-46207: [C++] Rename arrow::util::StringBuilder and move to internal namespace #46813

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

Merged
merged 2 commits into from
Jul 1, 2025

Conversation

Ziy1-Tan
Copy link
Contributor

@Ziy1-Tan Ziy1-Tan commented Jun 14, 2025

Rationale for this change

  • Move and Rename function arrow::util::StringBuilder to internal namespace to avoid confusion with class arrow::StringBuilder

What changes are included in this PR?

  • Move arrow::util::StringBuilder to arrow::internal::StringBuilder
  • Rename arrow::internal::StringBuilder to arrow::internal::JoinToString
  • Rename arrow/util/string_builder.{h|cc} to arrow/util/string_util_internal.{h|cc}

Are these changes tested?

Yes.

Are there any user-facing changes?

No. they are used internally.

Copy link
Member

@raulcd raulcd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tackling the work.
Part of the current problem on CI is with calling the file *_internal.h . The header file won't be installed and this is used on some of the bindings which requires it. We can move the namespace to arrow::internal but keep installing the header file, probably naming the files string_util.cc and string_util.h?

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Jun 16, 2025
@Ziy1-Tan
Copy link
Contributor Author

Thanks for tackling the work. Part of the current problem on CI is with calling the file *_internal.h . The header file won't be installed and this is used on some of the bindings which requires it. We can move the namespace to arrow::internal but keep installing the header file, probably naming the files string_util.cc and string_util.h?

Thank you for your review. Let me take a look.

@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Jun 16, 2025
Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this. Just one suggestion, otherwise LGTM.


namespace internal {
namespace detail {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The detail namespace is now superfluous given there's already an enclosing internal namespace.

@Ziy1-Tan Ziy1-Tan force-pushed the string_builder branch 2 times, most recently from 340254b to 9ec056e Compare June 22, 2025 03:30
Copy link
Member

@raulcd raulcd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. This looks good to me. @pitrou do you want to take a look? It seems your suggestion has been tackled.

@raulcd raulcd requested a review from pitrou June 25, 2025 08:06
@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting change review Awaiting change review labels Jun 25, 2025
@pitrou
Copy link
Member

pitrou commented Jul 1, 2025

@github-actions crossbow submit -g cpp

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, thank you for your contribution @Ziy1-Tan . I'll wait for CI to pass and then merge.

Copy link

github-actions bot commented Jul 1, 2025

Revision: b9c5e4d

Submitted crossbow builds: ursacomputing/crossbow @ actions-44ea48c19a

Task Status
example-cpp-minimal-build-static GitHub Actions
example-cpp-minimal-build-static-system-dependency GitHub Actions
example-cpp-tutorial GitHub Actions
test-build-cpp-fuzz GitHub Actions
test-conda-cpp GitHub Actions
test-conda-cpp-valgrind GitHub Actions
test-cuda-cpp-ubuntu-22.04-cuda-11.7.1 GitHub Actions
test-debian-12-cpp-amd64 GitHub Actions
test-debian-12-cpp-i386 GitHub Actions
test-fedora-39-cpp GitHub Actions
test-ubuntu-22.04-cpp GitHub Actions
test-ubuntu-22.04-cpp-20 GitHub Actions
test-ubuntu-22.04-cpp-bundled GitHub Actions
test-ubuntu-22.04-cpp-emscripten GitHub Actions
test-ubuntu-22.04-cpp-no-threading GitHub Actions
test-ubuntu-24.04-cpp GitHub Actions
test-ubuntu-24.04-cpp-bundled-offline GitHub Actions
test-ubuntu-24.04-cpp-gcc-13-bundled GitHub Actions
test-ubuntu-24.04-cpp-gcc-14 GitHub Actions
test-ubuntu-24.04-cpp-minimal-with-formats GitHub Actions
test-ubuntu-24.04-cpp-thread-sanitizer GitHub Actions

@pitrou pitrou merged commit 1202d79 into apache:main Jul 1, 2025
38 checks passed
@pitrou pitrou removed the awaiting merge Awaiting merge label Jul 1, 2025
Copy link

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 1202d79.

There was 1 benchmark result indicating a performance regression:

The full Conbench report has more details.

@kou
Copy link
Member

kou commented Jul 4, 2025

@github-actions crossbow submit test-r-rstudio-r-base-4.1-opensuse155

Copy link

github-actions bot commented Jul 4, 2025

Revision: b9c5e4d

Submitted crossbow builds: ursacomputing/crossbow @ actions-21818136da

Task Status
test-r-rstudio-r-base-4.1-opensuse155 Azure

kou added a commit that referenced this pull request Jul 10, 2025
)

### Rationale for this change

OpenSUSE 15.5 ships old GCC (7.5) that doesn't have enough C++17 support.

### What changes are included in this PR?

Use Ubuntu 20.04 that ships GCC 9.3  instead of OpenSUSE 15.5.

Ubuntu 20.04 reached EOL but we can use it for now.

We discussed why we need OpenSUSE 15.5 based job at #45718 (comment) . We have the job because https://arrow.apache.org/docs/developers/cpp/building.html said "gcc 7.1 and higher should be sufficient".

We need require GCC 9 or later with #46813.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: #46989

Lead-authored-by: Sutou Kouhei <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
amoeba pushed a commit that referenced this pull request Jul 10, 2025
)

### Rationale for this change

OpenSUSE 15.5 ships old GCC (7.5) that doesn't have enough C++17 support.

### What changes are included in this PR?

Use Ubuntu 20.04 that ships GCC 9.3  instead of OpenSUSE 15.5.

Ubuntu 20.04 reached EOL but we can use it for now.

We discussed why we need OpenSUSE 15.5 based job at #45718 (comment) . We have the job because https://arrow.apache.org/docs/developers/cpp/building.html said "gcc 7.1 and higher should be sufficient".

We need require GCC 9 or later with #46813.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* GitHub Issue: #46989

Lead-authored-by: Sutou Kouhei <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants