@@ -273,7 +273,7 @@ pub fn parse_create_table(
273
273
match & next_token. token {
274
274
Token :: Word ( word) => match word. keyword {
275
275
Keyword :: COPY => {
276
- parser. expect_keyword ( Keyword :: GRANTS ) ?;
276
+ parser. expect_keyword_is ( Keyword :: GRANTS ) ?;
277
277
builder = builder. copy_grants ( true ) ;
278
278
}
279
279
Keyword :: COMMENT => {
@@ -297,7 +297,7 @@ pub fn parse_create_table(
297
297
break ;
298
298
}
299
299
Keyword :: CLUSTER => {
300
- parser. expect_keyword ( Keyword :: BY ) ?;
300
+ parser. expect_keyword_is ( Keyword :: BY ) ?;
301
301
parser. expect_token ( & Token :: LParen ) ?;
302
302
let cluster_by = Some ( WrappedCollection :: Parentheses (
303
303
parser. parse_comma_separated ( |p| p. parse_identifier ( false ) ) ?,
@@ -360,14 +360,14 @@ pub fn parse_create_table(
360
360
parser. prev_token ( ) ;
361
361
}
362
362
Keyword :: AGGREGATION => {
363
- parser. expect_keyword ( Keyword :: POLICY ) ?;
363
+ parser. expect_keyword_is ( Keyword :: POLICY ) ?;
364
364
let aggregation_policy = parser. parse_object_name ( false ) ?;
365
365
builder = builder. with_aggregation_policy ( Some ( aggregation_policy) ) ;
366
366
}
367
367
Keyword :: ROW => {
368
368
parser. expect_keywords ( & [ Keyword :: ACCESS , Keyword :: POLICY ] ) ?;
369
369
let policy = parser. parse_object_name ( false ) ?;
370
- parser. expect_keyword ( Keyword :: ON ) ?;
370
+ parser. expect_keyword_is ( Keyword :: ON ) ?;
371
371
parser. expect_token ( & Token :: LParen ) ?;
372
372
let columns = parser. parse_comma_separated ( |p| p. parse_identifier ( false ) ) ?;
373
373
parser. expect_token ( & Token :: RParen ) ?;
@@ -536,15 +536,15 @@ pub fn parse_copy_into(parser: &mut Parser) -> Result<Statement, ParserError> {
536
536
let from_stage: ObjectName ;
537
537
let stage_params: StageParamsObject ;
538
538
539
- parser. expect_keyword ( Keyword :: FROM ) ?;
539
+ parser. expect_keyword_is ( Keyword :: FROM ) ?;
540
540
// check if data load transformations are present
541
541
match parser. next_token ( ) . token {
542
542
Token :: LParen => {
543
543
// data load with transformations
544
- parser. expect_keyword ( Keyword :: SELECT ) ?;
544
+ parser. expect_keyword_is ( Keyword :: SELECT ) ?;
545
545
from_transformations = parse_select_items_for_data_load ( parser) ?;
546
546
547
- parser. expect_keyword ( Keyword :: FROM ) ?;
547
+ parser. expect_keyword_is ( Keyword :: FROM ) ?;
548
548
from_stage = parse_snowflake_stage_name ( parser) ?;
549
549
stage_params = parse_stage_params ( parser) ?;
550
550
@@ -860,7 +860,7 @@ fn parse_identity_property(parser: &mut Parser) -> Result<IdentityProperty, Pars
860
860
) )
861
861
} else if parser. parse_keyword ( Keyword :: START ) {
862
862
let seed = parser. parse_number ( ) ?;
863
- parser. expect_keyword ( Keyword :: INCREMENT ) ?;
863
+ parser. expect_keyword_is ( Keyword :: INCREMENT ) ?;
864
864
let increment = parser. parse_number ( ) ?;
865
865
866
866
Some ( IdentityPropertyFormatKind :: StartAndIncrement (
0 commit comments