Funzione get_array_length - Amazon Redshift

Amazon Redshift non supporterà più la creazione di nuove UDF Python a partire dal 1º novembre 2025. Se desideri utilizzare le UDF Python, creale prima di tale data. Le UDF Python esistenti continueranno a funzionare normalmente. Per ulteriori informazioni, consulta il post del blog.

Funzione get_array_length

Restituisce la lunghezza dell'array specificato. La funzione GET_ARRAY_LENGTH restituisce la lunghezza di un array SUPER dato un percorso oggetto o array.

Sintassi

get_array_length( super_expr )

Argomenti

super_expr

Una espressione SUPER valida della forma di array.

Tipo restituito

La funzione get_array_length restituisce INT.

Esempio

L'esempio seguente mostra una funzione get_array_length.

SELECT GET_ARRAY_LENGTH(ARRAY(1,2,3,4,5,6,7,8,9,10)); get_array_length ---------------------- 10 (1 row)