Skip to content

chore: port TSQL CREATE EXTERNAL TABLE (#4642)#2675

Open
mikills wants to merge 2 commits into
port/sqlfluff-4647from
port/sqlfluff-4642
Open

chore: port TSQL CREATE EXTERNAL TABLE (#4642)#2675
mikills wants to merge 2 commits into
port/sqlfluff-4647from
port/sqlfluff-4642

Conversation

@mikills
Copy link
Copy Markdown
Collaborator

@mikills mikills commented Jun 6, 2026

Summary

  • SQLFluff #4642 added the T-SQL CREATE EXTERNAL TABLE statement. Ported it to sqruff's tsql.rs: new CreateExternalTableStatementSegment (column list + WITH (...) options — reusing TableLocationClause, plus DATA_SOURCE/FILE_FORMAT/REJECT_TYPE/REJECT_VALUE/REJECT_SAMPLE_VALUE/REJECTED_ROW_LOCATION), wired into the T-SQL statement list, with the option keywords registered as unreserved.
  • Added the create_external_table fixture (.sql + .yml); the dialect test parses it with no unparsable segments. Parser-only change.

Ported from SQLFluff 1b8ba7f57886a971808ccbb2614cacb4e659535c
sqlfluff/sqlfluff#4642
sqlfluff/sqlfluff@1b8ba7f

Stacked on #2674 (#4647) → #2673 (#4661) → #2671 (#4653) → #2670 (#4654); base reverts to `main` as the chain merges.

mikills and others added 2 commits June 6, 2026 17:39
## Summary
  - SQLFluff #4642 added the T-SQL `CREATE EXTERNAL TABLE` statement. Ported it to sqruff's `tsql.rs`: new `CreateExternalTableStatementSegment` (column list + `WITH (...)` options — reusing `TableLocationClause`, plus `DATA_SOURCE`/`FILE_FORMAT`/`REJECT_TYPE`/`REJECT_VALUE`/`REJECT_SAMPLE_VALUE`/`REJECTED_ROW_LOCATION`), wired into the T-SQL statement list, with the option keywords registered as unreserved.
  - Added the `create_external_table` fixture (.sql + .yml); the dialect test parses it with no unparsable segments. Parser-only change.

  Ported from SQLFluff 1b8ba7f57886a971808ccbb2614cacb4e659535c
  sqlfluff/sqlfluff#4642
  sqlfluff/sqlfluff@1b8ba7f
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 6, 2026

Benchmark for 19b0e19

Click to view benchmark
Test Base PR %
DepthMap::from_parent 58.3±2.03µs 58.6±2.34µs +0.51%
fix_complex_query 12.2±0.11ms 12.4±0.14ms +1.64%
fix_superlong 208.0±12.56ms 221.5±8.18ms +6.49%
parse_complex_query 4.1±0.06µs 4.1±0.08µs 0.00%
parse_expression_recursion 7.0±0.12µs 6.8±0.08µs -2.86%
parse_simple_query 1054.1±17.09ns 1046.4±9.10ns -0.73%

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.

1 participant