You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Robin Qiu (Jira)" <ji...@apache.org> on 2021/02/02 18:48:00 UTC
[jira] [Commented] (BEAM-11696) NULL values don't work correctly
when implementing LOGICAL_AND aggregation function in ZetaSQL
[ https://issues.apache.org/jira/browse/BEAM-11696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17277391#comment-17277391 ]
Robin Qiu commented on BEAM-11696:
----------------------------------
Hi Sonam, could you share your unit test for this? You said "when input contains all null values", how do you do this in a query? Did you use parameters?
> NULL values don't work correctly when implementing LOGICAL_AND aggregation function in ZetaSQL
> ----------------------------------------------------------------------------------------------
>
> Key: BEAM-11696
> URL: https://issues.apache.org/jira/browse/BEAM-11696
> Project: Beam
> Issue Type: Bug
> Components: dsl-sql-zetasql
> Reporter: Sonam Ramchand
> Priority: P3
>
> Reference: [https://github.com/google/zetasql/blob/master/docs/functions-and-operators.md#logical_and]
> Performs a logical AND operation on expression and returns the result.
> Supported Argument Types: BOOL
> Returned Data Types: BOOL
> Example:
>
> {code:java}
> SELECT LOGICAL_AND(x) AS logical_and FROM UNNEST([true, false, true]) AS x;
> +-------------+
> | logical_and |
> +-------------+
> | false |
> +-------------+
> {code}
>
> Problems:
> After implementation, there is a problem:
> * When input contains all null values, the output is:
> {code:java}
> No matching signature for aggregate function LOGICAL_AND for argument types: INT64. Supported signature: LOGICAL_AND(BOOL) {code}
> which is same behavior as of BigQuery console. Though, it should return null.
> How to test: unit tests
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)