Skip to content

[core] Negative unix timestamp support#5710

Merged
JingsongLi merged 2 commits intoapache:masterfrom
tub:paimon-negative-timestamps
Jun 12, 2025
Merged

[core] Negative unix timestamp support#5710
JingsongLi merged 2 commits intoapache:masterfrom
tub:paimon-negative-timestamps

Conversation

@tub
Copy link
Copy Markdown
Contributor

@tub tub commented Jun 6, 2025

Purpose

Linked issue: close #5706

Allows unix timestamps to be negative, representing dates before 1970.

Tests

Added paimon-common/src/test/java/org/apache/paimon/utils/BinaryStringUtilsTest.java and paimon-common/src/test/java/org/apache/paimon/utils/StringUtilsTest.java covering both this change and increasing coverage of the existing methods.

API and Format

This doesn't change the API other than allowing negative timestamp values.

Documentation

n/a - the docs don't currently say that unix timestamps should be positive.

tub added 2 commits June 6, 2025 15:29
Also adding some test coverage to utils classes while I'm here
Removes some duplicated and unneccsary tests
@tub
Copy link
Copy Markdown
Contributor Author

tub commented Jun 11, 2025

@JingsongLi Mind having a look at this at some point, not urgent but we've potentially got some existing streams with negative timestamps we'll need to sink in the next month or so :)

Copy link
Copy Markdown
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

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

Thanks @tub , looks good to me!

@JingsongLi JingsongLi merged commit 8062d6c into apache:master Jun 12, 2025
21 checks passed
yuzelin pushed a commit that referenced this pull request Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Exception thrown on negative unix timestamp with FlinkCDC writer

2 participants