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


##########
datafusion/functions-aggregate/src/array_agg.rs:
##########
@@ -46,16 +48,25 @@ make_udaf_expr_and_func!(
 
 #[user_doc(
     doc_section(label = "General Functions"),
-    description = "Returns an array created from the expression elements. If 
ordering is required, elements are inserted in the specified order.",
+    description = r#"Returns an array created from the expression elements. If 
ordering is required, elements are inserted in the specified order.
+This aggregation function can only mix DISTINCT and ORDER BY if the ordering 
expression is exactly the same as the argument expression."#,
     syntax_example = "array_agg(expression [ORDER BY expression])",
-    sql_example = r#"```sql
+    sql_example = r#"
+```sql
 > SELECT array_agg(column_name ORDER BY other_column) FROM table_name;

Review Comment:
   My coworker just was trying to use array_agg with order by in DataFrames and 
given the language in this PR I think this example is in fact not allowed. Is 
that indeed the case?



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