Skip to content
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-41201: [C++] Fix mistake in integration test. Explicitly cast std::string to avoid compiler interpreting char* -> bool #41202

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

lidavidm
Copy link
Member

@lidavidm lidavidm commented Apr 15, 2024

Copy link

⚠️ GitHub issue #41201 has been automatically assigned in GitHub to PR creator.

@lidavidm
Copy link
Member Author

probably won't fix everything

@lidavidm
Copy link
Member Author

@github-actions crossbow submit verify-rc-source-integration-linux-*

Copy link

Revision: b13dfad

Submitted crossbow builds: ursacomputing/crossbow @ actions-909eb84915

Task Status
verify-rc-source-integration-linux-almalinux-8-amd64 GitHub Actions
verify-rc-source-integration-linux-conda-latest-amd64 GitHub Actions
verify-rc-source-integration-linux-ubuntu-20.04-amd64 GitHub Actions
verify-rc-source-integration-linux-ubuntu-22.04-amd64 GitHub Actions

ARROW_ASSIGN_OR_RAISE(auto res4, client.GetSessionOptions({}, {}));
if (res4.session_options !=
std::map<std::string, SessionOptionValue>{
{"bardouble", 456.0},
{"big_ol_string_list", "a,b,sea,dee, , ,geee,(づ。◕‿‿◕。)づ"}}) {
{"big_ol_string_list", std::string("a,b,sea,dee, , ,geee,(づ。◕‿‿◕。)づ")}}) {
Copy link
Member

Choose a reason for hiding this comment

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

You're probably missing the "key_with_invalid_value" in line 856 above?

@lidavidm
Copy link
Member Author

@github-actions crossbow submit verify-rc-source-integration-linux-*

Copy link

Revision: ca6161e

Submitted crossbow builds: ursacomputing/crossbow @ actions-dbfd11ad88

Task Status
verify-rc-source-integration-linux-almalinux-8-amd64 GitHub Actions
verify-rc-source-integration-linux-conda-latest-amd64 GitHub Actions
verify-rc-source-integration-linux-ubuntu-20.04-amd64 GitHub Actions
verify-rc-source-integration-linux-ubuntu-22.04-amd64 GitHub Actions

@lidavidm
Copy link
Member Author

Looks like this fixes things, minus some flakiness with NodeJS that should be unrelated.

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

+1

("..." was processed as std::vector<std::string>> not std::string implicitly on these environments, right?)

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting committer review Awaiting committer review labels Apr 16, 2024
@lidavidm
Copy link
Member Author

+1

("..." was processed as std::vector<std::string>> not std::string implicitly on these environments, right?)

It was implicitly treated as bool because a string literal is char[...] and the compiler apparently prefers to convert to char* -> bool rather than std::string

@kou
Copy link
Member

kou commented Apr 16, 2024

Thanks! I see!

@raulcd raulcd changed the title GH-41201: [C++] Fix mistake in integration test GH-41201: [C++] Fix mistake in integration test. Explicitly cast std::string to avoid compiler interpreting char* -> bool Apr 16, 2024
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.

The CI jobs are successful and the change looks good to me. Thanks @lidavidm for taking care of this one!

@raulcd raulcd merged commit 3c37848 into apache:main Apr 16, 2024
37 of 38 checks passed
@raulcd raulcd removed the awaiting merge Awaiting merge label Apr 16, 2024
@github-actions github-actions bot added the awaiting merge Awaiting merge label Apr 16, 2024
raulcd pushed a commit that referenced this pull request Apr 16, 2024
…:string to avoid compiler interpreting char* -> bool (#41202)

* GitHub Issue: #41201

Authored-by: David Li <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
@lidavidm lidavidm deleted the gh-41201 branch April 16, 2024 09:20
Copy link

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

There were no benchmark performance regressions. 🎉

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

tolleybot pushed a commit to tmct/arrow that referenced this pull request May 2, 2024
…t std::string to avoid compiler interpreting char* -> bool (apache#41202)

* GitHub Issue: apache#41201

Authored-by: David Li <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
vibhatha pushed a commit to vibhatha/arrow that referenced this pull request May 25, 2024
…t std::string to avoid compiler interpreting char* -> bool (apache#41202)

* GitHub Issue: apache#41201

Authored-by: David Li <[email protected]>
Signed-off-by: Raúl Cumplido <[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