You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beam.apache.org by Sonam Ramchand <so...@venturedive.com> on 2020/11/12 17:31:54 UTC

Problem being encountered while running the Query with COUNTIF function

Hi  Devs,

I am trying to implement the COUNTIF  function for Beam SQL ZetaSQL
dialect, as CombineFn.

Where I try to run the Test query (SELECT COUNTIF(f_long > 0) AS countif_no
FROM PCOLLECTION GROUP BY f_int2), I am getting Exception
Caused by:
org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.sql.validate.SqlValidatorException:
No match found for function signature COUNTIF(<BOOLEAN>).

Can anybody help me in knowing the reason behind this?

Thank you

-- 

Regards,
*Sonam*
Software Engineer
Mobile: +92 3088337296

<http://venturedive.com/>

Re: Problem being encountered while running the Query with COUNTIF function

Posted by Kyle Weaver <kc...@google.com>.
COUNTIF was not defined properly. See my response to the other thread
(let's continue discussion there to avoid context fragmentation).

On Thu, Nov 12, 2020 at 10:16 AM Ahmet Altay <al...@google.com> wrote:

> +Kenneth Knowles <kl...@google.com> +Andrew Pilloud <ap...@google.com> +Robin
> Qiu <ro...@google.com>
>
> On Thu, Nov 12, 2020 at 9:32 AM Sonam Ramchand <
> sonam.ramchand@venturedive.com> wrote:
>
>> Hi  Devs,
>>
>> I am trying to implement the COUNTIF  function for Beam SQL ZetaSQL
>> dialect, as CombineFn.
>>
>> Where I try to run the Test query (SELECT COUNTIF(f_long > 0) AS
>> countif_no FROM PCOLLECTION GROUP BY f_int2), I am getting Exception
>> Caused by:
>> org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.sql.validate.SqlValidatorException:
>> No match found for function signature COUNTIF(<BOOLEAN>).
>>
>> Can anybody help me in knowing the reason behind this?
>>
>> Thank you
>>
>> --
>>
>> Regards,
>> *Sonam*
>> Software Engineer
>> Mobile: +92 3088337296 <+92%20308%208337296>
>>
>> <http://venturedive.com/>
>>
>

Re: Problem being encountered while running the Query with COUNTIF function

Posted by Ahmet Altay <al...@google.com>.
+Kenneth Knowles <kl...@google.com> +Andrew Pilloud <ap...@google.com> +Robin
Qiu <ro...@google.com>

On Thu, Nov 12, 2020 at 9:32 AM Sonam Ramchand <
sonam.ramchand@venturedive.com> wrote:

> Hi  Devs,
>
> I am trying to implement the COUNTIF  function for Beam SQL ZetaSQL
> dialect, as CombineFn.
>
> Where I try to run the Test query (SELECT COUNTIF(f_long > 0) AS
> countif_no FROM PCOLLECTION GROUP BY f_int2), I am getting Exception
> Caused by:
> org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.sql.validate.SqlValidatorException:
> No match found for function signature COUNTIF(<BOOLEAN>).
>
> Can anybody help me in knowing the reason behind this?
>
> Thank you
>
> --
>
> Regards,
> *Sonam*
> Software Engineer
> Mobile: +92 3088337296 <+92%20308%208337296>
>
> <http://venturedive.com/>
>