Skip to content

Commit eee2f48

Browse files
Copilotllali
andcommitted
Remove filegroup support from JSON Index syntax
Co-authored-by: llali <17187348+llali@users.noreply.github.com>
1 parent ab3a74f commit eee2f48

File tree

5 files changed

+0
-35
lines changed

5 files changed

+0
-35
lines changed

SqlScriptDom/Parser/TSql/Ast.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4606,7 +4606,6 @@
46064606
<Member Name="JsonColumn" Type="Identifier" Summary="The JSON column for the index."/>
46074607
<Member Name="ForJsonPaths" Type="StringLiteral" Collection="true" Summary="The JSON paths specified in the FOR clause. Optional may have zero elements."/>
46084608
<InheritedMember Name="IndexOptions" ContainerClass="IndexStatement" />
4609-
<Member Name="OnFileGroupOrPartitionScheme" Type="FileGroupOrPartitionScheme" Summary="The filegroup or partition scheme. Might be null."/>
46104609
</Class>
46114610
<Class Name="WindowFrameClause" Summary="Represents the specification of window bounds for windowing aggregates.">
46124611
<Member Name="Top" Type="WindowDelimiter" Summary="Top boundary of the window."/>

SqlScriptDom/Parser/TSql/TSql170.g

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16989,7 +16989,6 @@ createJsonIndexStatement [IToken tUnique, bool? isClustered] returns [CreateJson
1698916989
Identifier vIdentifier;
1699016990
SchemaObjectName vSchemaObjectName;
1699116991
Identifier vJsonColumn;
16992-
FileGroupOrPartitionScheme vFileGroupOrPartitionScheme;
1699316992
StringLiteral vPath;
1699416993

1699516994
if (tUnique != null)
@@ -17035,12 +17034,6 @@ createJsonIndexStatement [IToken tUnique, bool? isClustered] returns [CreateJson
1703517034
With
1703617035
indexOptionList[IndexAffectingStatement.CreateIndex, vResult.IndexOptions, vResult]
1703717036
)?
17038-
(
17039-
On vFileGroupOrPartitionScheme=filegroupOrPartitionScheme
17040-
{
17041-
vResult.OnFileGroupOrPartitionScheme = vFileGroupOrPartitionScheme;
17042-
}
17043-
)?
1704417037
;
1704517038

1704617039
indexKeyColumnList[CreateIndexStatement vParent]

SqlScriptDom/ScriptDom/SqlServer/ScriptGenerator/SqlScriptGeneratorVisitor.CreateJsonIndexStatement.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,6 @@ public override void ExplicitVisit(CreateJsonIndexStatement node)
4444
}
4545

4646
GenerateIndexOptions(node.IndexOptions);
47-
48-
if (node.OnFileGroupOrPartitionScheme != null)
49-
{
50-
NewLineAndIndent();
51-
GenerateKeyword(TSqlTokenType.On);
52-
53-
GenerateSpaceAndFragmentIfNotNull(node.OnFileGroupOrPartitionScheme);
54-
}
5547
}
5648
}
5749
}

Test/SqlDom/Baselines170/JsonIndexTests170.sql

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,6 @@ CREATE JSON INDEX IX_JSON_Complete
1616
ON dbo.Users (JsonData)
1717
FOR ('$.profile.name', '$.profile.email') WITH (MAXDOP = 4, DATA_COMPRESSION = ROW);
1818

19-
CREATE JSON INDEX IX_JSON_Filegroup
20-
ON dbo.Users (JsonData)
21-
ON [PRIMARY];
22-
23-
CREATE JSON INDEX IX_JSON_Full
24-
ON dbo.Users (JsonData)
25-
FOR ('$.orders[*].amount', '$.orders[*].date') WITH (DROP_EXISTING = OFF, ALLOW_ROW_LOCKS = ON)
26-
ON [JsonIndexes];
27-
2819
CREATE JSON INDEX IX_JSON_Schema
2920
ON MySchema.MyTable (JsonColumn)
3021
FOR ('$.properties.value');

Test/SqlDom/TestScripts/JsonIndexTests170.sql

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,6 @@ CREATE JSON INDEX IX_JSON_Complete ON dbo.Users (JsonData)
1818
FOR ('$.profile.name', '$.profile.email')
1919
WITH (MAXDOP = 4, DATA_COMPRESSION = ROW);
2020

21-
-- JSON index with ON filegroup
22-
CREATE JSON INDEX IX_JSON_Filegroup ON dbo.Users (JsonData)
23-
ON [PRIMARY];
24-
25-
-- JSON index with FOR clause, WITH options, and ON filegroup
26-
CREATE JSON INDEX IX_JSON_Full ON dbo.Users (JsonData)
27-
FOR ('$.orders[*].amount', '$.orders[*].date')
28-
WITH (DROP_EXISTING = OFF, ALLOW_ROW_LOCKS = ON)
29-
ON [JsonIndexes];
30-
3121
-- JSON index on schema-qualified table
3222
CREATE JSON INDEX IX_JSON_Schema ON MySchema.MyTable (JsonColumn)
3323
FOR ('$.properties.value');

0 commit comments

Comments
 (0)