Skip to content

Comments

fix: display 0 secs for empty DayTime/MonthDayNano intervals#9023

Merged
Jefffrey merged 3 commits intoapache:mainfrom
Jefffrey:empty-interval-display
Jan 10, 2026
Merged

fix: display 0 secs for empty DayTime/MonthDayNano intervals#9023
Jefffrey merged 3 commits intoapache:mainfrom
Jefffrey:empty-interval-display

Conversation

@Jefffrey
Copy link
Contributor

Which issue does this PR close?

Rationale for this change

See #5914 (comment)

What changes are included in this PR?

If DayTime/MonthDayNano intervals are empty, write 0 secs for display.

Are these changes tested?

Updated existing tests.

Are there any user-facing changes?

Minor change in display behaviour (previously wrote out an empty string)

@github-actions github-actions bot added the arrow Changes to the arrow crate label Dec 21, 2025
Copy link
Contributor

@friendlymatthew friendlymatthew left a comment

Choose a reason for hiding this comment

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

Wowza, very nice catch! Btw I think CI is hung?

@Jefffrey
Copy link
Contributor Author

Wowza, very nice catch! Btw I think CI is hung?

CI failure seems unrelated, see #9024

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @Jefffrey and @friendlymatthew

@Jefffrey Jefffrey merged commit 67af92e into apache:main Jan 10, 2026
26 checks passed
@Jefffrey Jefffrey deleted the empty-interval-display branch January 10, 2026 07:20
Dandandan pushed a commit to Dandandan/arrow-rs that referenced this pull request Jan 15, 2026
…e#9023)

# Which issue does this PR close?

<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases.
You can link an issue to this PR using the GitHub syntax.
-->

- Closes apache#5914

# Rationale for this change

<!--
Why are you proposing this change? If this is already explained clearly
in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand
your changes and offer better suggestions for fixes.
-->

See
apache#5914 (comment)

# What changes are included in this PR?

<!--
There is no need to duplicate the description in the issue here but it
is sometimes worth providing a summary of the individual changes in this
PR.
-->

If DayTime/MonthDayNano intervals are empty, write `0 secs` for display.

# Are these changes tested?

<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code

If tests are not included in your PR, please explain why (for example,
are they covered by existing tests)?
-->

Updated existing tests.

# Are there any user-facing changes?

<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.

If there are any breaking changes to public APIs, please call them out.
-->

Minor change in display behaviour (previously wrote out an empty string)

Co-authored-by: Andrew Lamb <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve the display of interval types

3 participants