Skip to content

feat: datetime/date comparisons for row_filters (#87) - #89

Merged
ababic merged 2 commits into
mainfrom
cursor/row-filters-datetime-compare-e3d5
Aug 14, 2026
Merged

ababic merged 2 commits into
mainfrom
cursor/row-filters-datetime-compare-e3d5

Conversation

@ababic

@ababic ababic commented Aug 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes #87: lt / lte / gt / gte (and eq / neq) can compare ISO-8601 / Postgres timestamp text via format = "datetime", or calendar dates via format = "date".

Example

[row_filters."public.listing_order"]
retain = [
  { column = "created", op = "gte", value = "2025-02-14", format = "datetime" },
  { column = "created", op = "is_null" },
]

Behavior

  • Parses common pg_dump shapes (YYYY-MM-DD HH:MM:SS.fff+00, T separators, Z, short offsets)
  • Date-only thresholds with format = "datetime" are midnight UTC
  • Thresholds validated at config load (fail closed)
  • Unparseable cell values do not match (fail closed)
  • Numeric compares unchanged when format is omitted

Verification

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test --all-targets --all-features (177 passed)
  • CLI smoke: COPY retain window keeps rows on/after cutoff and NULLs; drops older rows

Tests / docs

  • Unit tests for parsing, retain windows, date-only compares, and config validation
  • README, configuration guide, .dumplingconf.example, CHANGELOG, AGENTS.md
Open in Web Open in Cursor 

cursoragent and others added 2 commits August 14, 2026 18:00
Allow lt/lte/gt/gte/eq/neq predicates to set format = "datetime" or
format = "date" so retain windows can use real timestamp cutoffs instead
of year-prefix like workarounds. Thresholds validate at config load;
unparseable cells fail closed.

Co-authored-by: andy <andy@wearecrew.com>
normalize_timestamp_text was rewriting date-only thresholds like
2025-02-14 into 2025-02-14:00 by mistaking -14 for an offset.

Co-authored-by: andy <andy@wearecrew.com>
@ababic
ababic marked this pull request as ready for review August 14, 2026 18:03
@ababic
ababic merged commit 48cb4b8 into main Aug 14, 2026
10 checks passed
@ababic
ababic deleted the cursor/row-filters-datetime-compare-e3d5 branch August 14, 2026 18:11
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.

row_filters: support datetime/timestamp comparisons (not only numeric gte/lt)

2 participants