pepijnve commented on code in PR #25112:
URL: https://github.com/apache/datafusion/pull/25112#discussion_r4070954588
##########
datafusion/sql/src/parser.rs:
##########
@@ -1248,6 +1346,87 @@ impl<'a> DFParser<'a> {
Ok(Statement::CreateExternalTable(create))
}
+ /// Parses a `CREATE EXTERNAL CATALOG` statement, with `CREATE [OR
+ /// REPLACE] EXTERNAL CATALOG` already consumed.
+ fn parse_create_external_catalog(
+ &mut self,
+ or_replace: bool,
+ ) -> Result<Statement, DataFusionError> {
+ let if_not_exists =
+ self.parser
+ .parse_keywords(&[Keyword::IF, Keyword::NOT, Keyword::EXISTS]);
+
+ if if_not_exists && or_replace {
+ return parser_err!("'IF NOT EXISTS' cannot coexist with
'REPLACE'");
+ }
+
+ let catalog_name = self.parser.parse_object_name(true)?;
+
+ #[derive(Default)]
+ struct Builder {
Review Comment:
Nothing at all. AI generated artefact that I missed during review. I've
removed it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]