You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Andrew Pilloud (Jira)" <ji...@apache.org> on 2021/07/22 00:11:00 UTC

[jira] [Updated] (BEAM-9708) count with no elements returns no value instead of 0

     [ https://issues.apache.org/jira/browse/BEAM-9708?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Pilloud updated BEAM-9708:
---------------------------------
    Resolution: Duplicate  (was: Fixed)
        Status: Resolved  (was: Resolved)

> count with no elements returns no value instead of 0
> ----------------------------------------------------
>
>                 Key: BEAM-9708
>                 URL: https://issues.apache.org/jira/browse/BEAM-9708
>             Project: Beam
>          Issue Type: Bug
>          Components: dsl-sql-zetasql
>            Reporter: Andrew Pilloud
>            Priority: P4
>              Labels: zetasql-compliance
>
> two failures in shard 3, One failure in shard 37
> {code:java}
> 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 {[]} {code}
> {code}
> [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}]
> {code}
> {code}
> SELECT COUNT(a) FROM (
> SELECT a FROM (SELECT 1 a UNION ALL SELECT 2 UNION ALL SELECT 3) LIMIT 0 OFFSET 0)
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)