Skip to content

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 13 Mar 21:49
· 295 commits to main since this release
a02c8c5
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)