CONTAINS (Lakehouse v1)
Checks if the array contains a specific element.
Analyze Syntax
Section titled “Analyze Syntax”func.contains( <array>, <element> )Analyze Examples
Section titled “Analyze Examples”func.contains([1, 2], 1)
┌───────────────────────────┐│ func.contains([1, 2], 1) │├───────────────────────────┤│ true │└───────────────────────────┘SQL Syntax
Section titled “SQL Syntax”CONTAINS( <array>, <element> )Aliases
Section titled “Aliases”SQL Examples
Section titled “SQL Examples”SELECT ARRAY_CONTAINS([1, 2], 1), CONTAINS([1, 2], 1);
┌─────────────────────────────────────────────────┐│ array_contains([1, 2], 1) │ contains([1, 2], 1) │├───────────────────────────┼─────────────────────┤│ true │ true │└─────────────────────────────────────────────────┘