I tried to run a query on google BigQuery api and got an exception as follows:
"Argument type mismatch in function IF: 'distinctPlayers' is type 'TYPE_UINT64', '0' is type 'TYPE_INT32'."
The query is too big so I wrote only part of it where it fails.
QUERY : sum(if(action_type == 3, distinctPlayers, 0)) as Game_Viral_Acceptor_Count
What I understood is:
if condition is true
then set distinctPlayers of type unsigned int64
otherwise set 0 which is of type int32
Can anyone throw some light on how to convert unsigned int64
to signed int
through BigQuery
.
Thanks in advance, Omkar