jonathanc-n commented on code in PR #13047:
URL: https://github.com/apache/datafusion/pull/13047#discussion_r1811338754


##########
datafusion/functions-nested/src/map.rs:
##########
@@ -238,7 +241,50 @@ impl ScalarUDFImpl for MapFunc {
     fn invoke(&self, args: &[ColumnarValue]) -> Result<ColumnarValue> {
         make_map_batch(args)
     }
+
+    fn documentation(&self) -> Option<&Documentation> {
+        Some(get_map_doc())
+    }
 }
+
+static DOCUMENTATION: OnceLock<Documentation> = OnceLock::new();
+
+fn get_map_doc() -> &'static Documentation {
+    DOCUMENTATION.get_or_init(|| {
+    Documentation::builder()
+        .with_doc_section(DOC_SECTION_SPECIAL)

Review Comment:
   > It seems like `map` is still a scalar function -- I was thinking that the 
`DocSection` was what was special (as in it would be `DOC_SECTION_SPECIAL` that 
was part of `scalar_doc_sections` 🤔<
   I think you mentioned above that you wanted the function to put in a 
doc_section_special here. So should I make the map function go under 'doc 
section map' instead?



##########
datafusion/functions-nested/src/map.rs:
##########
@@ -238,7 +241,50 @@ impl ScalarUDFImpl for MapFunc {
     fn invoke(&self, args: &[ColumnarValue]) -> Result<ColumnarValue> {
         make_map_batch(args)
     }
+
+    fn documentation(&self) -> Option<&Documentation> {
+        Some(get_map_doc())
+    }
 }
+
+static DOCUMENTATION: OnceLock<Documentation> = OnceLock::new();
+
+fn get_map_doc() -> &'static Documentation {
+    DOCUMENTATION.get_or_init(|| {
+    Documentation::builder()
+        .with_doc_section(DOC_SECTION_SPECIAL)

Review Comment:
   > It seems like `map` is still a scalar function -- I was thinking that the 
`DocSection` was what was special (as in it would be `DOC_SECTION_SPECIAL` that 
was part of `scalar_doc_sections` 🤔
   
   I think you mentioned above that you wanted the function to put in a 
doc_section_special here. So should I make the map function go under 'doc 
section map' instead?



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