Supported in: Batch, Streaming
Returns a sorted array of the given input array of structs sorted by the values of the given struct keys.
Expression categories: Array
Output type: Array<Struct>
Argument values:
ASCENDING
)]Output: [ {
age: 10,
}, {
age: 20,
}, {
age: 30,
} ]
Argument values:
DESCENDING
)]Output: [ {
age: 30,
}, {
age: 20,
}, {
age: 10,
} ]
Argument values:
ASCENDING
), (height, DESCENDING
)]Output: [ {
age: 10,
height: 80,
}, {
age: 10,
height...
Argument values:
ASCENDING
), (height, ASCENDING
)]Output: [ {
age: 10,
height: 65,
}, {
age: 10,
height...
Argument values:
ASCENDING
)]Output: [ {
subStructKey: {
age: 10,
},
}, {
subStructKey: {
age: 20,
},
}, {
subStructKey: {
age: 30,
},
} ]
Argument values:
ASCENDING
)]Output: [ {
age: null,
}, {
age: 10,
}, {
age: 30,
} ]
Argument values:
DESCENDING
)]Output: [ {
age: 30,
}, {
age: 10,
}, {
age: null,
} ]