Skip to content

bloblang: preserve sub-second precision in ts_unix#379

Open
twmb wants to merge 1 commit intomainfrom
connect-1327
Open

bloblang: preserve sub-second precision in ts_unix#379
twmb wants to merge 1 commit intomainfrom
connect-1327

Conversation

@twmb
Copy link
Contributor

@twmb twmb commented Mar 2, 2026

ts_unix() used time.Time.Unix() which returns int64, truncating any sub-second precision. Now returns a float64 when the timestamp has nanosecond components, preserving fractional seconds. Whole-second timestamps continue to return int64 for backward compatibility.

Fixes redpanda-data/connect#1327

ts_unix() used time.Time.Unix() which returns int64, truncating any
sub-second precision. Now returns a float64 when the timestamp has
nanosecond components, preserving fractional seconds. Whole-second
timestamps continue to return int64 for backward compatibility.

Fixes redpanda-data/connect#1327

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@CLAassistant
Copy link

CLAassistant commented Mar 2, 2026

CLA assistant check
All committers have signed the CLA.

@mihaitodor
Copy link
Contributor

Probably best to stick with what Ash replied here and not have this method return different types for different inputs.

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.

Potential bug regarding bloblang & unix timestamp methods

3 participants