Skip to content

Conversation

@HyukjinKwon
Copy link
Member

@HyukjinKwon HyukjinKwon commented Dec 11, 2025

Rationale for this change

The original ticket ARROW-4258 missed the followup task, see also #3395 (comment)

Adding the test originally intended to test.

What changes are included in this PR?

Added the tests dates with masks

Are these changes tested?

Yes, manually tested as below:

python3 -m pytest pyarrow/tests/test_pandas.py::test_create_date32_and_date64_arrays_with_mask

Are there any user-facing changes?

No, test-only.

@github-actions
Copy link

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



def test_safe_cast_from_float_with_nans_to_int():
# TODO(kszucs): write tests for creating Date32 and Date64 arrays, see
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is for Date32 and Date64 types, is it correct to remove this comment? (New tests are float -> int)

Copy link
Member Author

Choose a reason for hiding this comment

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

I was assuming that it is a mistake (from reading #3395 (comment)) ;-).

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, it is a bit confusing. Maybe some info can be found in the code in this comment: #3395 (comment)

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, thanks. Let me try!

Copy link
Member

Choose a reason for hiding this comment

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

I think current tests fit better! One more question, would we also use numpy when creating date arrays?

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Dec 15, 2025
@HyukjinKwon HyukjinKwon changed the title GH-48452: [Python] Add a test for safe cast from NumPy float64 array to integer GH-48452: [Python] Add tests for Date32 and Date64 array creation with masks Dec 23, 2025
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Dec 23, 2025
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.

3 participants