-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support of the MATRIALIZE PROJECTION|INDEX statement (#64)
- Loading branch information
Showing
9 changed files
with
272 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ALTER TABLE visits_order MATERIALIZE INDEX IF EXISTS user_name_index IN PARTITION '20240403'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ALTER TABLE visits_order MATERIALIZE PROJECTION IF EXISTS user_name_projection IN PARTITION '20240403'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
-- Origin SQL: | ||
ALTER TABLE visits_order MATERIALIZE INDEX IF EXISTS user_name_index IN PARTITION '20240403'; | ||
|
||
|
||
|
||
-- Format SQL: | ||
ALTER TABLE visits_order | ||
MATERIALIZE INDEX IF EXISTS user_name_index IN PARTITION '20240403'; |
8 changes: 8 additions & 0 deletions
8
parser/testdata/ddl/format/alter_table_materialize_projection.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
-- Origin SQL: | ||
ALTER TABLE visits_order MATERIALIZE PROJECTION IF EXISTS user_name_projection IN PARTITION '20240403'; | ||
|
||
|
||
|
||
-- Format SQL: | ||
ALTER TABLE visits_order | ||
MATERIALIZE PROJECTION IF EXISTS user_name_projection IN PARTITION '20240403'; |
42 changes: 42 additions & 0 deletions
42
parser/testdata/ddl/output/alter_table_materialize_index.sql.golden.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
[ | ||
{ | ||
"AlterPos": 0, | ||
"StatementEnd": 91, | ||
"TableIdentifier": { | ||
"Database": null, | ||
"Table": { | ||
"Name": "visits_order", | ||
"QuoteType": 1, | ||
"NamePos": 12, | ||
"NameEnd": 24 | ||
} | ||
}, | ||
"OnCluster": null, | ||
"AlterExprs": [ | ||
{ | ||
"MaterializedPos": 25, | ||
"StatementEnd": 91, | ||
"IfExists": true, | ||
"IndexName": { | ||
"Ident": { | ||
"Name": "user_name_index", | ||
"QuoteType": 1, | ||
"NamePos": 53, | ||
"NameEnd": 68 | ||
}, | ||
"DotIdent": null | ||
}, | ||
"Partition": { | ||
"PartitionPos": 72, | ||
"Expr": { | ||
"LiteralPos": 83, | ||
"LiteralEnd": 91, | ||
"Literal": "20240403" | ||
}, | ||
"ID": null, | ||
"All": false | ||
} | ||
} | ||
] | ||
} | ||
] |
42 changes: 42 additions & 0 deletions
42
parser/testdata/ddl/output/alter_table_materialize_projection.sql.golden.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
[ | ||
{ | ||
"AlterPos": 0, | ||
"StatementEnd": 101, | ||
"TableIdentifier": { | ||
"Database": null, | ||
"Table": { | ||
"Name": "visits_order", | ||
"QuoteType": 1, | ||
"NamePos": 12, | ||
"NameEnd": 24 | ||
} | ||
}, | ||
"OnCluster": null, | ||
"AlterExprs": [ | ||
{ | ||
"MaterializedPos": 25, | ||
"StatementEnd": 101, | ||
"IfExists": true, | ||
"ProjectionName": { | ||
"Ident": { | ||
"Name": "user_name_projection", | ||
"QuoteType": 1, | ||
"NamePos": 58, | ||
"NameEnd": 78 | ||
}, | ||
"DotIdent": null | ||
}, | ||
"Partition": { | ||
"PartitionPos": 82, | ||
"Expr": { | ||
"LiteralPos": 93, | ||
"LiteralEnd": 101, | ||
"Literal": "20240403" | ||
}, | ||
"ID": null, | ||
"All": false | ||
} | ||
} | ||
] | ||
} | ||
] |