Skip to content

GH-36323: [Python] Fix Timestamp scalar repr error on values outside datetime range - #36942

Merged
kou merged 4 commits into
apache:mainfrom
aboss123:timestamp_scalar_repr
Jul 31, 2023
Merged

GH-36323: [Python] Fix Timestamp scalar repr error on values outside datetime range#36942
kou merged 4 commits into
apache:mainfrom
aboss123:timestamp_scalar_repr

Conversation

@aboss123

Copy link
Copy Markdown
Contributor

Rationale for this change

#36323

What changes are included in this PR?

Changed the way repr is handled for TimestampScalar

Are these changes tested?

I have added a very basic test for this change to see whether it will error or not if outside the range.

Are there any user-facing changes?

The functionality of TimestampScalar's repr now uses the strftime function.

@kou

kou commented Jul 31, 2023

Copy link
Copy Markdown
Member

@github-actions crossbow submit -g python

@github-actions

Copy link
Copy Markdown

Revision: 8e6def2

Submitted crossbow builds: ursacomputing/crossbow @ actions-6d5645c1ef

TaskStatus
test-conda-python-3.10Github Actions
test-conda-python-3.10-hdfs-2.9.2Github Actions
test-conda-python-3.10-hdfs-3.2.1Github Actions
test-conda-python-3.10-pandas-latestGithub Actions
test-conda-python-3.10-pandas-nightlyGithub Actions
test-conda-python-3.10-spark-masterGithub Actions
test-conda-python-3.10-substraitGithub Actions
test-conda-python-3.11Github Actions
test-conda-python-3.11-dask-latestGithub Actions
test-conda-python-3.11-dask-upstream_develGithub Actions
test-conda-python-3.11-hypothesisGithub Actions
test-conda-python-3.11-pandas-upstream_develGithub Actions
test-conda-python-3.8Github Actions
test-conda-python-3.8-pandas-1.0Github Actions
test-conda-python-3.8-spark-v3.1.2Github Actions
test-conda-python-3.9Github Actions
test-conda-python-3.9-pandas-latestGithub Actions
test-conda-python-3.9-spark-v3.2.0Github Actions
test-cuda-pythonGithub Actions
test-debian-11-python-3Azure
test-fedora-35-python-3Azure
test-ubuntu-20.04-python-3Azure
test-ubuntu-22.04-python-3Github Actions

@aboss123

Copy link
Copy Markdown
ContributorAuthor

Will there need to be anything else I need to change, or is everything all set?

kou
kou approved these changes Jul 31, 2023

@koukou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

@conbench-apache-arrow

Copy link
Copy Markdown

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

There were no benchmark performance regressions. 🎉

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

loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request Nov 13, 2023
…tside datetime range (apache#36942)
### Rationale for this change
apache#36323
### What changes are included in this PR?
Changed the way repr is handled for TimestampScalar
### Are these changes tested?
I have added a very basic test for this change to see whether it will error or not if outside the range.
### Are there any user-facing changes?
The functionality of TimestampScalar's repr now uses the `strftime` function.
* Closes: apache#36323
Lead-authored-by: Ashish Bailkeri <ashishbailkeri123@gmail.com>
Co-authored-by: Ashish Bailkeri <47304318+aboss123@users.noreply.github.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Sign up for freeto 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.

[Python] Repr of Timestamp scalars error if they are outside range of stdlib datetime.datetime

2 participants

@aboss123@kou