@@ -3184,11 +3184,9 @@ impl<'a> Parser<'a> {
31843184 {
31853185 let expr2 = self.parse_expr()?;
31863186 Ok(Expr::IsNotDistinctFrom(Box::new(expr), Box::new(expr2)))
3187- } else if let Ok(is_normalized) = self.parse_unicode_is_normalized(expr) {
3188- Ok(is_normalized)
31893187 } else {
31903188 self.expected(
3191- "[NOT] NULL | TRUE | FALSE | DISTINCT | [form] NORMALIZED FROM after IS",
3189+ "[NOT] NULL or TRUE| FALSE or [NOT] DISTINCT FROM after IS",
31923190 self.peek_token(),
31933191 )
31943192 }
@@ -3853,7 +3851,7 @@ impl<'a> Parser<'a> {
38533851 /// If the current token is the `expected` keyword, consume the token.
38543852 /// Otherwise, return an error.
38553853 ///
3856- // todo deprecate in favor of expected_keyword_is
3854+ // todo deprecate infavor of expected_keyword_is
38573855 pub fn expect_keyword(&mut self, expected: Keyword) -> Result<TokenWithSpan, ParserError> {
38583856 if self.parse_keyword(expected) {
38593857 Ok(self.get_current_token().clone())
@@ -8455,33 +8453,6 @@ impl<'a> Parser<'a> {
84558453 }
84568454 }
84578455
8458- /// Parse a literal unicode normalization clause
8459- pub fn parse_unicode_is_normalized(&mut self, expr: Expr) -> Result<Expr, ParserError> {
8460- let neg = self.parse_keyword(Keyword::NOT);
8461- let normalized_form = self.maybe_parse(|parser| {
8462- match parser.parse_one_of_keywords(&[
8463- Keyword::NFC,
8464- Keyword::NFD,
8465- Keyword::NFKC,
8466- Keyword::NFKD,
8467- ]) {
8468- Some(Keyword::NFC) => Ok(NormalizationForm::NFC),
8469- Some(Keyword::NFD) => Ok(NormalizationForm::NFD),
8470- Some(Keyword::NFKC) => Ok(NormalizationForm::NFKC),
8471- Some(Keyword::NFKD) => Ok(NormalizationForm::NFKD),
8472- _ => parser.expected("unicode normalization form", parser.peek_token()),
8473- }
8474- })?;
8475- if self.parse_keyword(Keyword::NORMALIZED) {
8476- return Ok(Expr::IsNormalized {
8477- expr: Box::new(expr),
8478- form: normalized_form,
8479- negated: neg,
8480- });
8481- }
8482- self.expected("unicode normalization form", self.peek_token())
8483- }
8484-
84858456 pub fn parse_enum_values(&mut self) -> Result<Vec<EnumMember>, ParserError> {
84868457 self.expect_token(&Token::LParen)?;
84878458 let values = self.parse_comma_separated(|parser| {
@@ -9008,7 +8979,7 @@ impl<'a> Parser<'a> {
90088979 }
90098980 }
90108981
9011- /// Parse a table object for insertion
8982+ /// Parse a table object for insetion
90128983 /// e.g. `some_database.some_table` or `FUNCTION some_table_func(...)`
90138984 pub fn parse_table_object(&mut self) -> Result<TableObject, ParserError> {
90148985 if self.dialect.supports_insert_table_function() && self.parse_keyword(Keyword::FUNCTION) {
@@ -11916,7 +11887,7 @@ impl<'a> Parser<'a> {
1191611887 } else {
1191711888 let mut name = self.parse_grantee_name()?;
1191811889 if self.consume_token(&Token::Colon) {
11919- // Redshift supports namespace prefix for external users and groups:
11890+ // Redshift supports namespace prefix for extenrnal users and groups:
1192011891 // <Namespace>:<GroupName> or <Namespace>:<UserName>
1192111892 // https://docs.aws.amazon.com/redshift/latest/mgmt/redshift-iam-access-control-native-idp.html
1192211893 let ident = self.parse_identifier()?;
@@ -12912,7 +12883,7 @@ impl<'a> Parser<'a> {
1291212883 Ok(WithFill { from, to, step })
1291312884 }
1291412885
12915- // Parse a set of comma separated INTERPOLATE expressions (ClickHouse dialect)
12886+ // Parse a set of comma seperated INTERPOLATE expressions (ClickHouse dialect)
1291612887 // that follow the INTERPOLATE keyword in an ORDER BY clause with the WITH FILL modifier
1291712888 pub fn parse_interpolations(&mut self) -> Result<Option<Interpolate>, ParserError> {
1291812889 if !self.parse_keyword(Keyword::INTERPOLATE) {
@@ -14461,7 +14432,7 @@ mod tests {
1446114432 assert_eq!(
1446214433 ast,
1446314434 Err(ParserError::ParserError(
14464- "Expected: [NOT] NULL | TRUE | FALSE | DISTINCT | [form] NORMALIZED FROM after IS, found: a at Line: 1, Column: 16"
14435+ "Expected: [NOT] NULL or TRUE| FALSE or [NOT] DISTINCT FROM after IS, found: a at Line: 1, Column: 16"
1446514436 .to_string()
1446614437 ))
1446714438 );
0 commit comments