ARRAY_SORTBY (Lakehouse v2)
Ordena os elementos de uma matriz pelos elementos correspondentes de outra matriz.
Sintaxe do Analyze
Seção intitulada “Sintaxe do Analyze”func.array_sortby(get_column(table, 'names'), get_column(table, 'scores'))Exemplos do Analyze
Seção intitulada “Exemplos do Analyze”func.array_sortby(['c','a','b'], [3,1,2])
┌───────────────┐│ ['a','b','c'] │└───────────────┘Sintaxe SQL
Seção intitulada “Sintaxe SQL”ARRAY_SORTBY(<names>, <scores>)Exemplos SQL
Seção intitulada “Exemplos SQL”SELECT ARRAY_SORTBY(['c','a','b'], [3,1,2]);
┌───────────────┐│ ["a","b","c"] │└───────────────┘