Skip to content

fix: stats for timestamp fields for pstats#1608

Merged
nikhilsinhaparseable merged 1 commit intoparseablehq:mainfrom
nikhilsinhaparseable:stats-ts
Apr 1, 2026
Merged

fix: stats for timestamp fields for pstats#1608
nikhilsinhaparseable merged 1 commit intoparseablehq:mainfrom
nikhilsinhaparseable:stats-ts

Conversation

@nikhilsinhaparseable
Copy link
Copy Markdown
Contributor

@nikhilsinhaparseable nikhilsinhaparseable commented Apr 1, 2026

update millisecond timestamp formatting to naive_utc earlier:
ingestion - 2026-04-01T10:31:52.161,
field stats distinct value - 2026-04-01 10:31:52.161 UTC

now:
field stats distinct value - 2026-04-01T10:31:52.161

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Updated timestamp formatting for millisecond-precision values to ensure consistent and accurate display, with improved handling of invalid timestamps.

update millisecond timestamp formatting to naive_utc
earlier:
ingestion - 2026-04-01T10:31:52.161,
field stats distinct value - 2026-04-01 10:31:52.161 UTC

now:
field stats distinct value - 2026-04-01T10:31:52.161
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 29cbd212-b83f-4fa2-9618-167c610221e6

📥 Commits

Reviewing files that changed from the base of the PR and between a68d90f and beb5b78.

📒 Files selected for processing (1)
  • src/storage/field_stats.rs

Walkthrough

Timestamp formatting for Arrow millisecond timestamps updated in format_arrow_value to use explicit UTC-naive conversion and pattern-based formatting instead of direct string conversion, with unchanged fallback handling for invalid timestamps.

Changes

Cohort / File(s) Summary
Timestamp Formatting
src/storage/field_stats.rs
Modified Arrow millisecond timestamp formatting to convert to UTC-naive datetime and use explicit "%Y-%m-%dT%H:%M:%S%.3f" pattern instead of direct to_string() conversion.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 A timestamp once danced in the light,
Now formatted explicit and tight—
UTC-naive, a pattern so clear,
Milliseconds precise without fear!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete; it lacks the standard template sections including issue reference, structured description, and testing/documentation checklist required by the repository. Add issue reference (Fixes #XXXX), expand description with goal/rationale, and include the testing and documentation checklist from the template.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: fixing timestamp field stats formatting for pstats, which directly aligns with the code modification in format_arrow_value.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@nikhilsinhaparseable nikhilsinhaparseable merged commit 187a4e6 into parseablehq:main Apr 1, 2026
12 checks passed
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.

2 participants