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

Task Status
test-conda-python-3.10 Github Actions
test-conda-python-3.10-hdfs-2.9.2 Github Actions
test-conda-python-3.10-hdfs-3.2.1 Github Actions
test-conda-python-3.10-pandas-latest Github Actions
test-conda-python-3.10-pandas-nightly Github Actions
test-conda-python-3.10-spark-master Github Actions
test-conda-python-3.10-substrait Github Actions
test-conda-python-3.11 Github Actions
test-conda-python-3.11-dask-latest Github Actions
test-conda-python-3.11-dask-upstream_devel Github Actions
test-conda-python-3.11-hypothesis Github Actions
test-conda-python-3.11-pandas-upstream_devel Github Actions
test-conda-python-3.8 Github Actions
test-conda-python-3.8-pandas-1.0 Github Actions
test-conda-python-3.8-spark-v3.1.2 Github Actions
test-conda-python-3.9 Github Actions
test-conda-python-3.9-pandas-latest Github Actions
test-conda-python-3.9-spark-v3.2.0 Github Actions
test-cuda-python Github Actions
test-debian-11-python-3 Azure
test-fedora-35-python-3 Azure
test-ubuntu-20.04-python-3 Azure
test-ubuntu-22.04-python-3 Github Actions

@aboss123

Copy link
Copy Markdown
Contributor Author

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

@kou kou 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 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.

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

2 participants