Skip to content

GH-45908: [C++][Docs] Rename and expose basic {Array,...}FromJSON helpers as public APIs #46180

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 33 commits into from
May 14, 2025

Conversation

amoeba
Copy link
Member

@amoeba amoeba commented Apr 18, 2025

Rationale for this change

These functions are generally useful and stable so it would be a good idea to clearly include them in the public API. I'm starting here with just the basic ones in order to make the PR small. See #45908 for more information.

What changes are included in this PR?

  • Moves ArrayFromJSON, ChunkedArrayFromJSON, DictArrayFromJSON, ScalarFromJSON, DictScalarFromJSON from arrow::ipc::internal namespace to arrow::json so it's clearer they're part of the public API and that they're more useful than just for IPC
  • Renames each of the above from {Array,...}FromJSON to {Array,...}FromJSONString to avoid confusion between these helpers and the main JSON(L) reader
  • Renames arrow/util/json_simple.{h,cc} to arrow/json/from_string.{h,cc} both because of the namespace jump but also because the filename is more clear.
  • Adds User Guide and adds a listing in the API docs for moved functions

Are these changes tested?

Yes.

Are there any user-facing changes?

This expands the scope of our public API but does not break any existing public APIs though it's possible users

This comment was marked as resolved.

amoeba added 2 commits April 20, 2025 18:00
This moves the following functions from the IPC namespace to util to make it clear these are useful outside of their use in Arrow IPC.

- ArrayFromJSON
- ChunkedArrayFromJSON
- DictArrayFromJSON
- ScalarFromJSON
- DictScalarFromJSON
@amoeba amoeba force-pushed the feature/GH-45908--expose-from-json branch from 3b6015e to cf808f9 Compare April 21, 2025 01:00
@amoeba amoeba changed the title GH-45908: [C++] Expose {Array,...}FromJSON as public APIs GH-45908: [C++] Expose basic {Array,...}FromJSON helpers as public APIs Apr 21, 2025
@amoeba amoeba marked this pull request as ready for review April 21, 2025 02:36
@amoeba amoeba requested review from bkietz, zanmato1984 and pitrou April 21, 2025 02:37
@amoeba
Copy link
Member Author

amoeba commented Apr 21, 2025

@github-actions crossbow submit preview-docs

@amoeba amoeba changed the title GH-45908: [C++] Expose basic {Array,...}FromJSON helpers as public APIs GH-45908: [C++][Docs] Expose basic {Array,...}FromJSON helpers as public APIs Apr 21, 2025
Copy link

Revision: cf808f9

Submitted crossbow builds: ursacomputing/crossbow @ actions-7a9d15701e

Task Status
preview-docs GitHub Actions

@amoeba
Copy link
Member Author

amoeba commented Apr 21, 2025

Docs previews:

Copy link
Contributor

@zanmato1984 zanmato1984 left a comment

Choose a reason for hiding this comment

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

Thank you for bringing this up! I have some minor comments.

@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Apr 21, 2025
@bkietz
Copy link
Member

bkietz commented May 8, 2025

It would be nice to know what it is about that particular job that makes it fail but I can file a minor PR for it since it sounds like a fix we should make.

The rest of the PR seems ready to go, for now could you comment out any cases in the GDB test which reference utf-8 strings to verify that's the only thing failing? (And keep CI green until you make the minor PR; I'll help review)

@bkietz
Copy link
Member

bkietz commented May 8, 2025

Well, those cases appear to have been responsible for that failure. After looking more closely, we've got an issue open for this already: #46343

@amoeba
Copy link
Member Author

amoeba commented May 8, 2025

Nice catch. I commented there. I reverted the testing commit so the PR is in a merge-able state. Would you be okay if we merged with that one job failing or should we wait on #46343 and rebase before merge?

Copy link
Contributor

@EnricoMi EnricoMi left a comment

Choose a reason for hiding this comment

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

Some minor comments.

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting change review Awaiting change review labels May 9, 2025
@amoeba
Copy link
Member Author

amoeba commented May 9, 2025

Thanks @bkietz. There were a couple of comments from @EnricoMi and I'll merge this once those are resolved.

Copy link
Contributor

@EnricoMi EnricoMi left a comment

Choose a reason for hiding this comment

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

LGTM!

@amoeba amoeba merged commit 07778d9 into apache:main May 14, 2025
41 of 42 checks passed
@amoeba amoeba removed the awaiting merge Awaiting merge label May 14, 2025
@amoeba
Copy link
Member Author

amoeba commented May 14, 2025

Merged. Thanks all for the reviews, it's greatly appreciated.

@github-actions github-actions bot added the awaiting committer review Awaiting committer review label May 14, 2025
@pitrou
Copy link
Member

pitrou commented May 14, 2025

I posted a couple comments, it would be nice to do a post-commit polish PR.

@amoeba
Copy link
Member Author

amoeba commented May 14, 2025

I'll file an issue to follow-up on those.

Copy link

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 07778d9.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them.

amoeba added a commit to amoeba/arrow that referenced this pull request Jun 3, 2025
pull bot pushed a commit to thompson-tomo/arrow that referenced this pull request Jun 3, 2025
…nternal.h (apache#46695)

### Rationale for this change

Addresses apache#46180 (comment). One of three PRs to resolve apache#46439.

### What changes are included in this PR?

- Remove unneeded namespace prefix in test_util_internal.h.

### Are these changes tested?

Yes. Impacted tests still pass.

### Are there any user-facing changes?

No.
* GitHub Issue: apache#46439

Authored-by: Bryce Mecum <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
@amoeba
Copy link
Member Author

amoeba commented Jun 5, 2025

The post-merge comments were all resolved in #46439.

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.

7 participants