Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-11696

NULL values don't work correctly when implementing LOGICAL_AND aggregation function in ZetaSQL

Details

    • Bug
    • Status: Resolved
    • P3
    • Resolution: Not A Problem
    • None
    • Not applicable
    • dsl-sql-zetasql
    • None

    Description

      Reference: https://github.com/google/zetasql/blob/master/docs/functions-and-operators.md#logical_and 

      Problems: 

      After implementation, there is a problem:

      • When input contains all null values:
      SELECT LOGICAL_AND(a) AS logical_and FROM UNNEST([null, null, null]) AS a;
      

      the output is:

      No matching signature for aggregate function LOGICAL_AND for argument types: INT64. Supported signature: LOGICAL_AND(BOOL)  

               which is same behavior as of BigQuery console. Though, it should return null.

      How to test: unit tests

       

      Attachments

        Activity

          People

            ibzib Kyle Weaver
            sonam_ramchand Sonam Ramchand
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: