findepi commented on code in PR #13517: URL: https://github.com/apache/datafusion/pull/13517#discussion_r1855189688
########## datafusion/expr/src/logical_plan/ddl.rs: ########## @@ -288,8 +290,234 @@ impl PartialOrd for CreateExternalTable { } } +impl CreateExternalTable { + pub fn new(fields: CreateExternalTableFields) -> Result<Self> { Review Comment: > Given all the fields in `CreateExternalTable` are `pub` anyway, I don't think introducing `CreateExternalTableFields` requires all construction to go through `new` 🤔 i think it's disallowed by non_exhaustive. in fact, i did revert this PR changes in `datafusion/core/src/catalog_common/listing_schema.rs` and `cargo check` failed with ``` error[E0639]: cannot create non-exhaustive struct using struct expression --> datafusion/core/src/catalog_common/listing_schema.rs:134:26 | 134 | &CreateExternalTable { | __________________________^ 135 | | schema: Arc::new(DFSchema::empty()), 136 | | name, 137 | | location: table_url, ... | 147 | | column_defaults: Default::default(), 148 | | }, | |_________________________^ For more information about this error, try `rustc --explain E0639`. ``` -- 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