iffyio commented on code in PR #1939: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1939#discussion_r2212632085
########## src/ast/mod.rs: ########## @@ -9524,6 +9550,29 @@ impl Display for Tag { } } +/// Snowflake `WITH CONTACT ( purpose = contact [ , purpose = contact ...] )` +/// +/// <https://docs.snowflake.com/en/sql-reference/sql/create-database> +#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)] +#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))] +pub struct ContactEntry { + pub purpose: String, + pub contact: String, +} + +impl ContactEntry { + pub fn new(purpose: String, contact: String) -> Self { + Self { purpose, contact } + } +} Review Comment: Ah sorry to clarify I meant that we should remove the `new` function, not the struct itself. So that callers can manually do `ContactEntry { purpose, "foo", contact: "bar" }` instead of `ContactEntry::new("foo", "bar")` -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org