@@ -387,6 +387,22 @@ class ArrayTypeSegment(ansi.ArrayTypeSegment):
387387 )
388388
389389
390+ class ForSystemTimeAsOfSegment (BaseSegment ):
391+ """A `FOR SYSTEM_TIME AS OF` syntax.
392+
393+ https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#for_system_time_as_of
394+ """
395+
396+ type = "for_system_time_as_of_segment"
397+ match_grammar = Sequence (
398+ "FOR" ,
399+ OneOf ("SYSTEM_TIME" , Sequence ("SYSTEM" , "TIME" )),
400+ "AS" ,
401+ "OF" ,
402+ Ref ("ExpressionSegment" ),
403+ )
404+
405+
390406class QualifyClauseSegment (BaseSegment ):
391407 """A `QUALIFY` clause like in `SELECT`."""
392408
@@ -483,6 +499,7 @@ class StatementSegment(ansi.StatementSegment):
483499 Ref ("SetStatementSegment" ),
484500 Ref ("ExportStatementSegment" ),
485501 Ref ("CreateExternalTableStatementSegment" ),
502+ Ref ("CreateSnapshotTableStatementSegment" ),
486503 Ref ("AssertStatementSegment" ),
487504 Ref ("CallStatementSegment" ),
488505 Ref ("ReturnStatementSegment" ),
@@ -785,14 +802,7 @@ class IntervalExpressionSegment(ansi.IntervalExpressionSegment):
785802 ]
786803 ),
787804 PostTableExpressionGrammar = Sequence (
788- Sequence (
789- "FOR" ,
790- OneOf ("SYSTEM_TIME" , Sequence ("SYSTEM" , "TIME" )),
791- "AS" ,
792- "OF" ,
793- Ref ("ExpressionSegment" ),
794- optional = True ,
795- ),
805+ Ref ("ForSystemTimeAsOfSegment" , optional = True ),
796806 Sequence (
797807 "WITH" ,
798808 "OFFSET" ,
@@ -1756,6 +1766,27 @@ class CreateExternalTableStatementSegment(BaseSegment):
17561766 )
17571767
17581768
1769+ class CreateSnapshotTableStatementSegment (BaseSegment ):
1770+ """A `CREATE SNAPSHOT TABLE` statement.
1771+
1772+ https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_snapshot_table_statement
1773+ """
1774+
1775+ type = "create_snapshot_table_statement"
1776+
1777+ match_grammar = Sequence (
1778+ "CREATE" ,
1779+ "SNAPSHOT" ,
1780+ "TABLE" ,
1781+ Ref ("IfNotExistsGrammar" , optional = True ),
1782+ Ref ("TableReferenceSegment" ),
1783+ "CLONE" ,
1784+ Ref ("TableReferenceSegment" ),
1785+ Ref ("ForSystemTimeAsOfSegment" , optional = True ),
1786+ Ref ("OptionsSegment" , optional = True ),
1787+ )
1788+
1789+
17591790class CreateViewStatementSegment (ansi .CreateViewStatementSegment ):
17601791 """A `CREATE VIEW` statement.
17611792
0 commit comments