Omega359 commented on code in PR #13575:
URL: https://github.com/apache/datafusion/pull/13575#discussion_r1861327073
##########
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:
Gain one thing, loose another. Those fields now no longer have obvious names
as they did previously if you are looking at them outside of an IDE. It's ok
but it's obviously not the choice I made.
--
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]