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-45362: [C++] Fix identity cast for time and list scalar #45370

Merged
merged 4 commits into from
Feb 5, 2025

Conversation

mapleFU
Copy link
Member

@mapleFU mapleFU commented Jan 28, 2025

Rationale for this change

The PR #40237 introduced code:

// time to time
template <typename To, typename From, typename T = typename To::TypeClass>

However, the Time64Type::TypeClass doesn't exist, so SFINAE always failed.

Are these changes tested?

Yes

Are there any user-facing changes?

No.

@mapleFU mapleFU requested a review from zanmato1984 January 28, 2025 17:23
Copy link

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

@mapleFU
Copy link
Member Author

mapleFU commented Jan 29, 2025

Windows CI failed seems to be related.

@mapleFU mapleFU force-pushed the GH-45362 branch 2 times, most recently from a615d7c to 22134a8 Compare January 29, 2025 13:42
@mapleFU
Copy link
Member Author

mapleFU commented Jan 30, 2025

Also cc @pitrou since this is new year and @zanmato1984 might not have time for this

@pitrou pitrou changed the title GH-45362: [C++] Fix Identity cast for time scalar GH-45362: [C++] Fix identity cast for time scalar Feb 4, 2025
@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Feb 4, 2025
test_identity_cast_for_type(type);
}
/*
for (auto& type: {
Copy link
Member Author

Choose a reason for hiding this comment

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

decimal seems not have castTo

Copy link
Member

Choose a reason for hiding this comment

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

Can we open issues for the missing casts?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added, but seems previous issue wants to deprecate them, I think these issues may also be mark as not planned, lol

Comment on lines 182 to 183
// arrow::map(arrow::binary(), arrow::int32()),
// struct_({field("float", arrow::float32())}),
Copy link
Member Author

Choose a reason for hiding this comment

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

struct and map seems not supports castTo non string types

@mapleFU mapleFU changed the title GH-45362: [C++] Fix identity cast for time scalar GH-45362: [C++] Fix identity cast for time and list scalar Feb 5, 2025
@mapleFU mapleFU requested a review from pitrou February 5, 2025 12:18
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 the update @mapleFU !

cpp/src/arrow/scalar_test.cc Outdated Show resolved Hide resolved
test_identity_cast_for_type(type);
}
/*
for (auto& type: {
Copy link
Member

Choose a reason for hiding this comment

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

Can we open issues for the missing casts?

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 the update @mapleFU ! LGTM.

@pitrou pitrou merged commit d9e7fa6 into apache:main Feb 5, 2025
36 of 37 checks passed
@pitrou pitrou removed the awaiting committer review Awaiting committer review label Feb 5, 2025
@github-actions github-actions bot added the awaiting committer review Awaiting committer review label Feb 5, 2025
@mapleFU mapleFU deleted the GH-45362 branch February 5, 2025 14:04
Copy link

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

There were 8 benchmark results with an error:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants