Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-5430

Implement IFNULL() for BigQuery dialect

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 1.33.0
    • None
    • None

    Description

      Implementing IFNULL() for BIG_QUERY dialect

       

      IFNULL(expr, null_result) 

      If expr evaluates to NULL, returns null_result. Otherwise, returns expr. If expr doesn't evaluate to NULL, null_result isn't evaluated.

      https://cloud.google.com/bigquery/docs/reference/standard-sql/conditional_expressions#ifnull 

       

      example:

      ifnull(null, 5) -> returns 5

      ifnull(1,2) -> returns 1 

      Attachments

        Activity

          People

            oliverlee Oliver Lee
            oliverlee Oliver Lee
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: