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
* Merged PR 2076477: adding CREATE SEMANTIC INDEX feature
Syntax
CREATE SEMANTIC INDEX index_name
ON table_name (column_definition [,...n] )
WITH (index_option [, ...n])
[ON {FILEGROUP <filegroup_name> | DEFAULT}]
[;]
column_definition :: = column_name
[SEARCH_TYPE {vector | fulltext | hybrid}]
[TYPE COLUMN type_column_name]
[LANGUAGE language_term]
[CHUNK_USING(chunk_option [,...n] )]
chunk_option ::= {
TYPE = {fixed | sentence | paragraph chapter
| SIZE = character_count_per_chunk
| OVERLAP = character_overlap_percentage
}
index_option ::= {
EXTERNAL_MODEL = model_name [ (model_option) ]
[VECTOR_INDEX ( vector_index_option [,...n] )]
[FULLTEXT_STOPLIST = {OFF | SYSTEM | stoplist_name}]
[MAXDOP = degree_of_parallelism]
[DROP_EXISTING = { OFF | ON }]
}
model_option ::= {
PARAMETERS = json_config
}
vector_index_option ::= {
METRIC = {'cosine' | 'dot' | 'euclidean'}
| TYPE = 'diskann'
}
- [X] The [Common checklist](https://msdata.visualstudio.com/SQLToolsAndLibraries/_git/Common?path=/Templates/PR%20Checklist%20for%20SQLToolsAndLibraries.md&version=GBmain&_a=preview) has been reviewed and followed
- [X] Code changes are accompanied by appropriate unit tests
- [ ] Identified and included SMEs needed to review code changes
- [ ] Follow the [steps](https://msdata.visualstudio.com/SQLToolsAndLibraries/_wiki/wikis/SQLToolsAndLibraries.wiki/33838/Adding-or-Extending-TSql-support-in-Sql-Dom?anchor=make-the-changes-in) here to make changes in the code
- [X] Follow the [steps](https://msdata.visualstudio.com/SQLToolsAndLibraries/_wiki/wikis/SQLToolsAndLibraries.wiki/33838/Adding-or-Extending-TSql-support-in-Sql-Dom?anchor=to-extend-the-tests-do-the-following%3A) here to add new tests for your feature
- [ ] Update relevant documentation in the [wiki](https://dev.azure.com/msdata/SQLToolsAndLibraries/_wiki/wikis/SQLToolsAndLibraries.wiki) and the README.md file
Please provide any additional information that might be helpful for the reviewers
adding create semanic index feature
----
New feature implementation adding support for CREATE SEMANTIC INDEX statement in SQL Server's T-SQL parser (TSql180).
This PR implements comprehensive parsing and script generation support for the new CREATE SEMANTIC INDEX statement, which enables semantic indexing with vector search, full-text search, and hybrid search capabilities. The feature includes column-level options for search types, chunk...
* Merged PR 2111576: [Trident DW] Support invoke_external_api intrinsic and its' UDF syntax
# Pull Request Template for ScriptDom
## Description
This PR adds support for a new intrinsic that we've been implementing in Fabric DataWarehouse: `invoke_external_api` and its' UDF syntax sugar which later must become the only supported syntax - `EXTERNAL FUNCTION`
## Code Change
- [x] The [Common checklist](https://msdata.visualstudio.com/SQLToolsAndLibraries/_git/Common?path=/Templates/PR%20Checklist%20for%20SQLToolsAndLibraries.md&version=GBmain&_a=preview) has been reviewed and followed
- [x] Code changes are accompanied by appropriate unit tests
- [x] Identified and included SMEs needed to review code changes
- [x] Follow the [steps](https://msdata.visualstudio.com/SQLToolsAndLibraries/_wiki/wikis/SQLToolsAndLibraries.wiki/33838/Adding-or-Extending-TSql-support-in-Sql-Dom?anchor=make-the-changes-in) here to make changes in the code
## Testing
- [x] Follow the [steps](https://msdata.visualstudio.com/SQLToolsAndLibraries/_wiki/wikis/SQLToolsAndLibraries.wiki/33838/Adding-or-Extending-TSql-support-in-Sql-Dom?anchor=to-extend-the-tests-do-the-following%3A) here to add new tests for your feature
## Documentation
- [x] Update relevant documentation in the [wiki](https://dev.azure.com/msdata/SQLToolsAndLibraries/_wiki/wikis/SQLToolsAndLibraries.wiki) and the README.md file - no changes requried
## Additional Information
[AI and Extensibility.docx](https://microsoft.sharepoint.com/:w:/r/teams/AzurePolaris/_layouts/15/doc2.aspx?sourcedoc=%7B75BAC667-A870-4482-8A37-F80E6EC8FCE0%7D&file=AI%20and%20Extensibiliy.docx)
`VARCHAR(MAX) invoke_external_api('functionSetName', 'functionName'[, ... args])` - invokes Fabric Function `functionName` in `functionSetName` where Function Set is `User Defined Functions` item in PowerBI Workspace.
`CREATEA FUNCTION [schema].[localName] [RETURNS <type>] AS EXTERNAL FUNCTION functionSetName.functionName` is a DDL syntax used to create SQL UDF based on function from Function Set. The DML would be:
`SELECT [schema].[localName](col1) FROM tbl`, which during expression tree transformation will become `invoke_external_api`
----
#### AI description (iteration 3)
#### PR Classification
New feature: Adding support for external function definitions and the `INVOKE_EXTERNAL_API` intrinsic function in Trident Data Warehouse (Fabric DW).
#### PR Summary
This PR introduces syntax support for creating external functions and invoking external APIs in SQL ScriptDom for Fabric DW. It enables defining function aliases to external function sets and calling them via a new intrinsic.
- **`TSqlFabricDW.g`**: Added grammar rules for `CREATE/ALTER/CREATE OR ALTER FUNCTION ... AS EXTERNAL FUNCTION` statements and `INVOKE_EXTERNAL_API` function call syntax
- **`Ast.xml`**: Defined new AST node types `ExternalFunctionStatement` (and variants) and `InvokeExternalApiFunctionCall` with their properties
- **`SqlScriptGeneratorVisitor.ExternalFunctionStatement.cs`** and **`SqlScriptGeneratorVisitor.InvokeExternalApiFunction.cs`**: Implemen...
* Merged PR 2150081: Adding release notes for 180.37.3
adding release notes for 180.37.3
----
#### AI description (iteration 2)
#### PR Classification
This is a documentation update adding release notes for version 180.35.0 of Microsoft.SqlServer.TransactSql.ScriptDom.
#### PR Summary
This pull request adds comprehensive release notes documenting new features, bug fixes, and improvements in version 180.35.0 of the SQL Script DOM library.
- `/release-notes/180/180.37.3.md`: Documents support for CREATE FUNCTION AS EXTERNAL FUNCTION in Microsoft Fabric Warehouse
- `/release-notes/180/180.37.3.md`: Lists bug fixes for PERSIST_SAMPLE_PERCENT parsing, AlterTableAddTableElementStatement separator issues, and WindowDefinition whitespace handling
- `/release-notes/180/180.37.3.md`: Notes improvements to comment preservation in SQL Server script generator and .NET SDK update to version 8.0.420
<!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
---------
Co-authored-by: Ema Paunovic <emapaunovic@microsoft.com>
Co-authored-by: Maksim Vlasov <maksimvlasov@microsoft.com>
<ClassName="ExternalFunctionStatement"Base="TSqlStatement"Abstract="true"Summary="Represents the CREATE/ALTER FUNCTION ... AS EXTERNAL FUNCTION statement.">
798
+
<MemberName="Name"Type="SchemaObjectName"Summary="The name of the function being created or altered. Can at most be a two part name."/>
799
+
<MemberName="Parameters"Type="ProcedureParameter"Collection="true"Summary="Parameters which can be passed to the external function."/>
800
+
<MemberName="ReturnType"Type="DataTypeReference"Summary="Optional RETURNS clause specifying the data type returned by the external function."/>
801
+
<MemberName="ExternalName"Type="SchemaObjectName"Summary="The external function reference of the form functionSetName.functionName."/>
802
+
</Class>
803
+
<ClassName="CreateExternalFunctionStatement"Base="ExternalFunctionStatement"Summary="Represents the CREATE FUNCTION ... AS EXTERNAL FUNCTION statement.">
<ClassName="AlterExternalFunctionStatement"Base="ExternalFunctionStatement"Summary="Represents the ALTER FUNCTION ... AS EXTERNAL FUNCTION statement.">
<ClassName="CreateOrAlterExternalFunctionStatement"Base="ExternalFunctionStatement"Summary="Represents the CREATE OR ALTER FUNCTION ... AS EXTERNAL FUNCTION statement.">
<MemberName="OnFileGroupOrPartitionScheme"Type="FileGroupOrPartitionScheme"Summary="The filegroup or partition scheme. Might be null."/>
4660
4684
</Class>
4685
+
<ClassName="SemanticIndexChunkOption"Summary="Represents a chunk option in a CHUNK_USING clause of a semantic index column.">
4686
+
<MemberName="OptionKind"Type="SemanticIndexChunkOptionKind"GenerateUpdatePositionInfoCall="false"Summary="The kind of chunk option (Type, Size, or Overlap)."/>
4687
+
<MemberName="Value"Type="IdentifierOrValueExpression"Summary="The value of the chunk option."/>
4688
+
</Class>
4689
+
<ClassName="SemanticIndexColumn"Summary="Represents a column definition in a CREATE SEMANTIC INDEX statement.">
<MemberName="SearchType"Type="SemanticIndexSearchType"GenerateUpdatePositionInfoCall="false"Summary="The search type (vector, fulltext, hybrid). NotSpecified if not specified."/>
4692
+
<MemberName="TypeColumnName"Type="Identifier"Summary="The TYPE COLUMN name. Optional may be null."/>
4693
+
<MemberName="Language"Type="IdentifierOrValueExpression"Summary="The LANGUAGE term. Optional may be null."/>
4694
+
<MemberName="ChunkOptions"Type="SemanticIndexChunkOption"Collection="true"Summary="The CHUNK_USING options. Optional may have zero elements."/>
4695
+
</Class>
4696
+
<ClassName="CreateSemanticIndexStatement"Base="IndexStatement"Summary="Represents the CREATE SEMANTIC INDEX statement.">
<MemberName="ExternalModelName"Type="Identifier"Summary="The external model name. Optional may be null."/>
4701
+
<MemberName="ExternalModelParameters"Type="StringLiteral"Summary="The PARAMETERS value for the external model. Optional may be null."/>
4702
+
<MemberName="VectorIndexOptions"Type="IndexOption"Collection="true"Summary="The VECTOR_INDEX options (METRIC, TYPE). Optional may have zero elements."/>
4703
+
<MemberName="FulltextStoplistOption"Type="StopListFullTextIndexOption"Summary="The FULLTEXT_STOPLIST option. Optional may be null."/>
0 commit comments