findepi commented on code in PR #13517:
URL: https://github.com/apache/datafusion/pull/13517#discussion_r1855189451


##########
datafusion/expr/src/logical_plan/ddl.rs:
##########
@@ -192,11 +193,12 @@ impl DdlStatement {
 
 /// Creates an external table.
 #[derive(Debug, Clone, PartialEq, Eq)]
+#[non_exhaustive]

Review Comment:
   > Why make it non exhaustive?
   
   To disallow public direct construction. If we allow public direct 
construction, we can't enforce invariants in the factory method, since it may 
or may not get called.
   
   > That might make it harder to write match statements where all the fields 
are matched (and the compiler tells you when new ones are added)
   
   💯  and i think this is important use-case. that's why those new 
`into_fields()` are added 
   
   



-- 
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

Reply via email to