feat(gfql): add temporal predicates and type system#673
Merged
Conversation
This was referenced Jun 23, 2025
bfa3ca4 to
edf8508
Compare
- Add temporal value classes (DateTime, Date, Time) with timezone support - Extend comparison predicates (GT, LT, GE, LE, EQ, NE, Between) for temporal values - Enhance IsIn predicate to support temporal values with type validation - Add comprehensive GFQL type system with guards and coercions - Include temporal value serialization and wire format support - Add comprehensive test coverage for temporal operations Enables date/time comparisons and filtering in GFQL queries. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add TypeGuard import with proper Python version handling - Add TypeGuard annotation to is_basic_scalar for type narrowing - Include TemporalValue in ComparisonInput and IsInElementInput unions - Enables proper type checking for temporal predicates 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Remove unnecessary type: ignore comment - Add proper handling for TemporalValue in _normalize_value - Type narrowing now works correctly with TypeGuard 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Remove monolithic _temporal_comparison method with operator dispatch - Add focused helper methods for series preparation and value extraction - Inline comparison logic directly in each operator (GT, LT, GE, LE, EQ, NE) - Eliminate all type: ignore and cast statements - Each operator now clearly shows both numeric and temporal comparison logic 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Use version check for TypeGuard import only during TYPE_CHECKING - Remove pd.Series[T] generic syntax not supported in Python 3.8 - Ensures mypy passes on all supported Python versions 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Move Any import from method-level to module-level - Move DateTimeWire, DateWire, TimeWire imports to module-level - Fixes dynamic import issue flagged during code review 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
edf8508 to
a98a273
Compare
- Add temporal_predicates.ipynb demo notebook with TOC and examples - Add datetime_filtering.md with imports, standards, and duration notes - Update wire_protocol_examples.md with clearer structure - Documentation for GFQL temporal predicate features Co-Authored-By: Claude <noreply@anthropic.com>
- Add comprehensive datetime filtering guide - Add temporal predicates notebook with examples - Add wire protocol examples for temporal values - Update GFQL overview with temporal examples - Update predicates quick reference with temporal operators - Add temporal modules to API documentation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add temporal value classes to changelog - Add wire protocol support mention - Add documentation references (datetime guide, wire protocol, notebook) 📤 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…links - Add datetime_filtering and wire_protocol_examples to GFQL toctree - Use relative HTML links that work across all hosting environments - Links go up two levels from demos/gfql/ to reach gfql/ documentation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Change from non-existent temporal_values module to ast_temporal - Fixes autodoc import error during documentation build 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Streamline datetime filtering guide with concise examples - Add clear links to Python/Pandas datetime documentation - Improve notebook imports with explanatory comments - Fix broken chain.rst link to use correct path - Make documentation more actionable with direct type links 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Remove "recommended" verbiage in favor of direct documentation - Keep examples factual without good/bad judgments - Let ordering and examples guide usage naturally 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Document that wire protocol dicts are a supported input type - Show how to use ISO strings via wire protocol dicts - Clarify that only raw strings raise ValueError 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Replace bad_filter/good_filter with factual variable names - Keep error handling examples factual without judgments - Align with direct documentation style 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add missing execution_count field to all code cells - Remove invalid outputs field from markdown cell
…TeX compatibility
…-updated Merging temporal predicates documentation
3 tasks
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.
Enables date/time comparisons and filtering in GFQL queries.
Related PRs
🤖 Generated with Claude Code