NULLIF (Lakehouse v2)
Returns NULL if two expressions are equal, otherwise returns the first expression.
Analyze Syntax
Section titled “Analyze Syntax”func.nullif(get_column(table, 'value'), 0)Analyze Examples
Section titled “Analyze Examples”func.nullif(get_column(table, 'divisor'), 0)SQL Syntax
Section titled “SQL Syntax”NULLIF(<value>, 0)SQL Examples
Section titled “SQL Examples”SELECT 100 / NULLIF(divisor, 0) AS safe_division FROM calculations;
┌───────────────┐│ safe_division │├───────────────┤│ 50.00 ││ NULL ││ 25.00 │└───────────────┘