jonahgao commented on code in PR #13517: URL: https://github.com/apache/datafusion/pull/13517#discussion_r1864367427
########## datafusion/expr/src/logical_plan/ddl.rs: ########## @@ -288,8 +290,234 @@ impl PartialOrd for CreateExternalTable { } } +impl CreateExternalTable { + pub fn try_new(fields: CreateExternalTableFields) -> Result<Self> { + let CreateExternalTableFields { Review Comment: I think `CreateExternalTableFields` makes things too complex. It has exactly the same fields as `CreateExternalTable`, and users will feel confused and need to spend time distinguishing and using them. In my opinion, it is enough to perform all the validity checks in `CreateExternalTableBuilder::build`, such as missing required fields and duplicate column names. `CreateExternalTable`s typically come from the SQL planner of DataFusion, where we have already used the builder. For other scenarios, we can encourage users in the documentation to use the Builder API to create `CreateExternalTable`s . -- 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