Omega359 commented on code in PR #13575:
URL: https://github.com/apache/datafusion/pull/13575#discussion_r1862252991


##########
datafusion/doc/src/lib.rs:
##########
@@ -86,29 +90,30 @@ pub struct DocSection {
 ///         description: None,
 ///     };
 ///
-///     let documentation = Documentation::builder()
-///           .with_doc_section(doc_section)
-///           .with_description("Add one to an int32")
-///           .with_syntax_example("add_one(2)")
+///     let documentation = Documentation::builder(doc_section, "Add one to an 
int32".to_owned(), "add_one(2)".to_owned())
 ///           .with_argument("arg_1", "The int32 number to add one to")
 ///           .build();
 /// # }
 pub struct DocumentationBuilder {
-    pub doc_section: Option<DocSection>,
-    pub description: Option<String>,
-    pub syntax_example: Option<String>,
+    pub doc_section: DocSection,
+    pub description: String,
+    pub syntax_example: String,
     pub sql_example: Option<String>,
     pub arguments: Option<Vec<(String, String)>>,
     pub alternative_syntax: Option<Vec<String>>,
     pub related_udfs: Option<Vec<String>>,
 }
 
 impl DocumentationBuilder {
-    pub fn new() -> Self {
+    pub fn new(

Review Comment:
   > Thats' correct. But another thing to mention the builder API mostly gonna 
be used internally within documentation generator crate so the user has to deal 
with attributes rather than API itself.
   
   Ah, thanks for mentioning that as I had forgotten that.
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to