Ask Your Question
4

What is the sorting arrangement for the array_agg function in SparkSQL?

asked 2023-06-25 13:20:09 +0000

bukephalos gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-06-25 13:29:01 +0000

djk gravatar image

The array_agg function in SparkSQL does not have a specific sorting arrangement by default. It collects values from a group of input rows and returns them as an array, retaining the order of occurrence in the input rows. However, you can specify a custom sorting arrangement using the order by clause within the window function if required.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-25 13:20:09 +0000

Seen: 9 times

Last updated: Jun 25 '23