From 6da04deb0d07a37c7c85547bcfe0568bebe94484 Mon Sep 17 00:00:00 2001 From: Kevin Biju Date: Fri, 12 Apr 2024 14:57:44 +0530 Subject: [PATCH] parsing for CREATE PEER, PubSub and ES --- src/keywords.rs | 2 ++ src/parser/mod.rs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/keywords.rs b/src/keywords.rs index d0a12cb..ecf0d7b 100644 --- a/src/keywords.rs +++ b/src/keywords.rs @@ -236,6 +236,7 @@ define_keywords!( DUPLICATE, DYNAMIC, EACH, + ELASTICSEARCH, ELEMENT, ELEMENTS, ELSE, @@ -510,6 +511,7 @@ define_keywords!( PRIVILEGES, PROCEDURE, PROGRAM, + PUBSUB, PURGE, QUALIFY, QUARTER, diff --git a/src/parser/mod.rs b/src/parser/mod.rs index 0439a2a..eff5965 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -8406,6 +8406,8 @@ impl<'a> Parser<'a> { Some(Keyword::S3) => Ok(PeerType::S3), Some(Keyword::SQLSERVER) => Ok(PeerType::SQLServer), Some(Keyword::EVENTHUBS) => Ok(PeerType::Eventhubs), + Some(Keyword::PUBSUB) => Ok(PeerType::PubSub), + Some(Keyword::ELASTICSEARCH) => Ok(PeerType::Elasticsearch), other => { let supported_peer_types = [ "BIGQUERY", @@ -8416,6 +8418,8 @@ impl<'a> Parser<'a> { "S3", "SQLSERVER", "EVENTHUBS", + "PUBSUB", + "ELASTICSEARCH" ]; let err = format!( "expected peertype as one of {}, got {:#?}",