mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-15 00:09:02 +00:00
Error on dangling NO
in CREATE SEQUENCE
options (#1104)
This commit is contained in:
parent
3a6d3ecba2
commit
498708c463
2 changed files with 8 additions and 4 deletions
|
@ -8700,13 +8700,12 @@ impl<'a> Parser<'a> {
|
|||
)));
|
||||
}
|
||||
// [ [ NO ] CYCLE ]
|
||||
if self.parse_keywords(&[Keyword::NO]) {
|
||||
if self.parse_keywords(&[Keyword::CYCLE]) {
|
||||
sequence_options.push(SequenceOptions::Cycle(true));
|
||||
}
|
||||
if self.parse_keywords(&[Keyword::NO, Keyword::CYCLE]) {
|
||||
sequence_options.push(SequenceOptions::Cycle(true));
|
||||
} else if self.parse_keywords(&[Keyword::CYCLE]) {
|
||||
sequence_options.push(SequenceOptions::Cycle(false));
|
||||
}
|
||||
|
||||
Ok(sequence_options)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue