Snowflake: Support CLONE option in CREATE DATABASE/SCHEMA statements (#1958)

This commit is contained in:
Yoav Cohen 2025-07-21 14:41:20 +03:00 committed by GitHub
parent a73577c29f
commit 799c1f748d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 63 additions and 0 deletions

View file

@ -4917,12 +4917,19 @@ impl<'a> Parser<'a> {
None
};
let clone = if self.parse_keyword(Keyword::CLONE) {
Some(self.parse_object_name(false)?)
} else {
None
};
Ok(Statement::CreateSchema {
schema_name,
if_not_exists,
with,
options,
default_collate_spec,
clone,
})
}
@ -4957,11 +4964,18 @@ impl<'a> Parser<'a> {
_ => break,
}
}
let clone = if self.parse_keyword(Keyword::CLONE) {
Some(self.parse_object_name(false)?)
} else {
None
};
Ok(Statement::CreateDatabase {
db_name,
if_not_exists: ine,
location,
managed_location,
clone,
})
}