rawsun007 opened a new pull request, #25930:
URL: https://github.com/apache/datafusion/pull/25930

   ## Which issue does this PR close?
   
   - None; documentation fix.
   
   ## Rationale for this change
   
   The `array_distinct` example says `select array_distinct([1, 3, 2, 3, 1, 2, 
4])` returns `[1, 2, 3, 4]`. It returns `[1, 3, 2, 4]`: #20364 changed it to 
keep elements in the order they first appear, matching `array_union` and 
`array_intersect`, and the example was not updated.
   
   ## What changes are included in this PR?
   
   The `#[user_doc]` example and description in `set_ops.rs`, the matching code 
comment, and `scalar_functions.md` regenerated with 
`./dev/update_function_docs.sh`. Also a sqllogictest case for the order, since 
every existing `array_distinct` case used input whose sorted and first-seen 
orders coincide.
   
   ## What is the testing strategy for this PR?
   
   Ran the example against `datafusion-cli` built from `main`. The new case in 
`array_distinct.slt` passes; `cargo fmt --check`, `cargo clippy -p 
datafusion-functions-nested --all-targets -- -D warnings` and 
`./ci/scripts/doc_prettier_check.sh` pass.
   
   ## Are there any user-facing changes?
   
   Documentation and a test only.
   
   Generated with Claude Code (claude-opus-5-5); I checked the output above.
   


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