code: def test_sql_nullif_coalesce(foods_ipc_path: Path) -> None:
      nums = pl.LazyFrame(
          {
              "x": [1, None, 2, 3, None, 4],
              "y": [5, 4, None, 3, None, 2],
              "z": [3, 4, None, 3, None, None],
          }
      )
  
      res = pl.SQLContext(df=nums).execute(
          """
          SELECT
          COALESCE(x,y,z) as "coal",
          NULLIF(x,y) as "nullif x_y",
          NULLIF(y,z) as "nullif y_z",
          COALESCE(x, NULLIF(y,z)) as "both"
          FROM df
          """,
          eager=True,
      )
  
      assert res.to_dict(as_series=False) == {
          "coal": [1, 4, 2, 3, None, 4],
          "nullif x_y": [1, None, 2, None, None, 4],
          "nullif y_z": [5, None, None, None, None, 2],
          "both": [1, None, 2, 3, None, 4],
      }
  
imports: from __future__ import annotations
  import datetime
  import math
  from pathlib import Path
  import pytest
  import polars
  import polars.selectors
  from polars.exceptions import ComputeError, InvalidOperationError
  from polars.testing import assert_frame_equal, assert_series_equal
label_desc: Use image node_id 31 for calling a global function with example usage: test_sql_nullif_coalesce(foods_ipc_path) without return types