Skip to content

chore: port TSQL PERIOD FOR SYSTEM_TIME for temporal tables (#4654)#2670

Merged
benfdking merged 1 commit into
mainfrom
port/sqlfluff-4654
Jun 6, 2026
Merged

chore: port TSQL PERIOD FOR SYSTEM_TIME for temporal tables (#4654)#2670
benfdking merged 1 commit into
mainfrom
port/sqlfluff-4654

Conversation

@mikills
Copy link
Copy Markdown
Collaborator

@mikills mikills commented Jun 6, 2026

Summary

  • SQLFluff #4654 added the T-SQL PERIOD FOR SYSTEM_TIME (start_col, end_col) clause for temporal tables. Ported it to sqruff's tsql.rs: new PeriodSegment (reusing the existing SyntaxKind::PeriodSegment), wired into the CreateTableStatementSegment column/constraint list, with PERIOD and SYSTEM_TIME registered as unreserved keywords.
  • Added a minimal temporal_tables fixture (.sql + .yml) scoped to the PERIOD clause; the dialect test parses it with no unparsable segments. Parser-only change.

Ported from SQLFluff 68aa104eda611833ba5b17a76cb1b3f334bea7d0
sqlfluff/sqlfluff#4654
sqlfluff/sqlfluff@68aa104

## Summary
  - SQLFluff #4654 added the T-SQL `PERIOD FOR SYSTEM_TIME (start_col, end_col)` clause for temporal tables. Ported it to sqruff's `tsql.rs`: new `PeriodSegment` (reusing the existing `SyntaxKind::PeriodSegment`), wired into the `CreateTableStatementSegment` column/constraint list, with `PERIOD` and `SYSTEM_TIME` registered as unreserved keywords.
  - Added a minimal `temporal_tables` fixture (.sql + .yml) scoped to the PERIOD clause; the dialect test parses it with no unparsable segments. Parser-only change.

  Ported from SQLFluff 68aa104eda611833ba5b17a76cb1b3f334bea7d0
  sqlfluff/sqlfluff#4654
  sqlfluff/sqlfluff@68aa104
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 6, 2026

Benchmark for 3aa7a17

Click to view benchmark
Test Base PR %
DepthMap::from_parent 48.3±0.26µs 47.9±0.22µs -0.83%
fix_complex_query 10.1±0.15ms 10.1±0.07ms 0.00%
fix_superlong 162.8±11.99ms 176.8±12.29ms +8.60%
parse_complex_query 3.3±0.04µs 3.3±0.04µs 0.00%
parse_expression_recursion 5.6±0.03µs 5.8±0.07µs +3.57%
parse_simple_query 824.0±11.81ns 854.5±12.85ns +3.70%

@mikills mikills self-assigned this Jun 6, 2026
@benfdking benfdking merged commit 0e6eca9 into main Jun 6, 2026
25 of 28 checks passed
@benfdking benfdking deleted the port/sqlfluff-4654 branch June 6, 2026 22:21
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.

2 participants