Share via


Functions.ArrayPosition(Column, Object) Method

Definition

Locates the position of the first occurrence of the value in the given array as long. Returns null if either of the arguments are null.

[Microsoft.Spark.Since("2.4.0")]
public static Microsoft.Spark.Sql.Column ArrayPosition (Microsoft.Spark.Sql.Column column, object value);
[<Microsoft.Spark.Since("2.4.0")>]
static member ArrayPosition : Microsoft.Spark.Sql.Column * obj -> Microsoft.Spark.Sql.Column
Public Shared Function ArrayPosition (column As Column, value As Object) As Column

Parameters

column
Column

Column to apply

value
Object

Value to locate

Returns

Column object

Attributes

Remarks

The position is not zero based, but 1 based index. Returns 0 if value could not be found in array.

Applies to