elt
function
Applies to: Databricks SQL
Databricks Runtime
Returns the nth expression.
Syntax
elt(index, expr1 [, ...])
Arguments
index
: An INTEGER expression greater than 0.exprN
: Any expression that shares a least common type with allexprN
.
Returns
The result has the type of the least common type of the exprN
.
Index must be between 1 and the number of expr
. If index is out of bounds, an INVALID_ARRAY_INDEX error is raised.
Note
In Databricks Runtime, if spark.sql.ansi.enabled is false
, the function returns NULL
instead of an error if the index is out of bounds.
Examples
> SELECT elt(1, 'scala', 'java');
scala
Related functions
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για