Repository navigation
[GH-959] Add datetime filter expr support - #960
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for datetime filtering in filter expressions by introducing a date() function that parses ISO format datetime strings. The changes enable users to filter results by datetime fields using comparison operators.
Changes:
- Added
date()function parser to handle ISO format datetime strings in filter expressions - Implemented test coverage for datetime filtering functionality
- Added helper method to retrieve category names for a given set ID
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/memmachine/common/filter/filter_parser.py | Adds parsing logic for date() function to convert ISO format strings to datetime objects |
| tests/memmachine/common/filter/test_filter_parser.py | Adds comprehensive test cases for datetime parsing including valid/invalid formats and combinations with other expressions |
| src/memmachine/semantic_memory/semantic_memory.py | Implements get_set_id_category_names method to retrieve category names for a set |
| src/memmachine/semantic_memory/semantic_session_manager.py | Exposes get_set_id_category_names method in the session manager interface |
| tests/memmachine/semantic_memory/test_semantic_session_manager.py | Adds integration test for search functionality with time-based filters |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
o-love
force-pushed
the
fix/filter-time
branch
from
January 20, 2026 14:43
1c86ff5 to
aa4342f
Compare
o-love
force-pushed
the
fix/filter-time
branch
from
January 20, 2026 14:48
aa4342f to
54380e0
Compare
o-love
marked this pull request as ready for review
January 20, 2026 14:48
o-love
force-pushed
the
fix/filter-time
branch
2 times, most recently
from
January 20, 2026 14:57
8e58a15 to
c0d7a88
Compare
jealous
approved these changes
Jan 21, 2026
o-love
force-pushed
the
semantic-config
branch
from
January 21, 2026 13:37
7636701 to
5f14d63
Compare
malatewang
approved these changes
Jan 22, 2026
Contributor
|
Hi @o-love , is this PR ready to merge? thanks! |
o-love
force-pushed
the
fix/filter-time
branch
2 times, most recently
from
January 27, 2026 18:49
87888ec to
0685593
Compare
o-love
force-pushed
the
fix/filter-time
branch
from
January 27, 2026 19:00
0685593 to
a03def6
Compare
o-love
force-pushed
the
fix/filter-time
branch
from
January 27, 2026 19:34
93c975a to
98f5db4
Compare
SarahScargall
pushed a commit
to SarahScargall/MemMachine
that referenced
this pull request
Jan 29, 2026
* [MemMachineGH-959] Add datetime filter expr support * Apply Neo4j time fixes
edwinyyyu
reviewed
Feb 13, 2026
| tz = _dt.UTC | ||
| return value.replace(tzinfo=tz) | ||
| utc_offset = value.utcoffset() | ||
| tz = _dt.timezone(utc_offset) if utc_offset is not None else tzinfo |
Contributor
There was a problem hiding this comment.
May SEGFAULT with bad implementation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of the change
This PR adds support for datetime filtering in filter expressions by introducing a
date()function that parses ISO format datetime strings.New valid filter expressions:
"name='test' AND created_at >= date('2025-01-01T00:00:00')"Fixes/Closes
#959
Type of change
How Has This Been Tested?