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

count with no elements returns no value instead of 0

Details

    Description

      two failures in shard 3, One failure in shard 37

      Expected: ARRAY<STRUCT<INT64>>[{0}]
        Actual: ARRAY<STRUCT<$col1 INT64>>[], 
       Details: Number of array elements is {1} and {0} in respective arrays {[unordered: {0}]} and {[]} 
      [prepare_database]
      CREATE TABLE TableEmpty AS SELECT val FROM (SELECT 1 as val) WHERE false
      --
      ARRAY<STRUCT<val INT64>>[]
      ==
      [name=aggregation_count_6]
      SELECT COUNT(*) FROM TableEmpty
      --
      ARRAY<STRUCT<INT64>>[{0}]
      ==
      [name=aggregation_count_7]
      SELECT COUNT(val) FROM TableEmpty
      --
      ARRAY<STRUCT<INT64>>[{0}]
      
      SELECT COUNT(a) FROM (
      SELECT a FROM (SELECT 1 a UNION ALL SELECT 2 UNION ALL SELECT 3) LIMIT 0 OFFSET 0)
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              apilloud Andrew Pilloud
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: