You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: implement DATEDIFF and scalar functions in WHERE clause (#36)
* feat: implement DATEDIFF and scalar functions in WHERE clause
* fix: address Copilot review comments on ScalarWhereComparison
- Use []const u8 for owned-but-immutable fields (func, unit, col1_name,
col2_name) with ownership semantics documented in field comments
- Add missing errdefer for col2_buf in DATEDIFF block
- Add missing errdefer for col1_buf in DATEADD block
- Add missing errdefer for col1_buf in EXTRACT block
- Document why std.ascii.indexOfIgnoreCase is safe for EXTRACT FROM
parsing (no string literals can appear inside EXTRACT parentheses)
* fix: address remaining Copilot review comments on PR #36
- main.zig: move JOIN from NOT SUPPORTED to supported features list
- parser.zig evaluate(): implement scalar_comparison for DATEDIFF/EXTRACT
so JOIN + scalar WHERE predicates evaluate correctly (was silently false)
- parser.zig evaluateDirect(): replace DATEADD arm with explicit return false
and a comment explaining that DATEADD returns a datetime string which
cannot be parsed as f64 (previously called scalar.eval then always failed)