Re: Question about LOGICAL_AND

2020-11-19 Thread Robin Qiu
Hi Sonam, org.apache.beam.sdk.extensions.sql.zetasql.translation.SqlOperators$1 > cannot be cast to > org.apache.beam.vendor.calcite.v1_20_0.org.apache.calcite.sql.SqlAggFunction > java.lang.ClassCastException: > org.apache.beam.sdk.extensions.sql.zetasql.translation.SqlOperators$1 > cannot be cas

Re: Question about LOGICAL_AND

2020-11-17 Thread Sonam Ramchand
Hi Devs, Following the guidelines, I implemented CmobineFn Logical_AND as https://github.com/sonam-vend/beam/commit/9ad8ee1d8fa617aca7fcafc8e7efe8bf388b3afb. But i am getting *org.apache.beam.sdk.extensions.sql.zetasql.translation.SqlOperators$1 cannot be cast to org.apache.beam.vendor.calcite.v1

Re: Question about LOGICAL_AND

2020-11-17 Thread Sonam Ramchand
Hi Devs, Following the given guidelines, I implemented CmobineFn Logical_AND as https://github.com/sonam-vend/beam/commit/9ad8ee1d8fa617aca7fcafc8e7efe8bf388b3afb. But i am getting org.apache.beam.sdk.extensions.sql.zetasql.translation.SqlOperators$1 cannot be cast to org.apache.beam.vendor.calci

Re: Question about LOGICAL_AND

2020-11-13 Thread Robin Qiu
Oh I see. Thanks for the clarification, Kenn! Yeah the CombineFn LOGICAL_AND is to be implemented. On Fri, Nov 13, 2020 at 10:00 AM Kenneth Knowles wrote: > Some clarification: LOGICAL_AND is a ZetaSQL/BigQuery aggregate function: > https://cloud.google.com/bigquery/docs/reference/standard-sql/f

Re: Question about LOGICAL_AND

2020-11-13 Thread Kenneth Knowles
Some clarification: LOGICAL_AND is a ZetaSQL/BigQuery aggregate function: https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#logical_and So it needs to be implemented as a CombineFn. Here are some example PRs that do similar things: https://github.com/apache/beam

Re: Question about LOGICAL_AND

2020-11-12 Thread Rui Wang
Or the question is, which BeamSQL dialect you are using? -Rui On Thu, Nov 12, 2020 at 12:41 PM Robin Qiu wrote: > Hi Sonam, AND operator is already defined by Calcite and the mapping is > here: > https://github.com/apache/beam/blob/816017e44e3209d334f4f3b2bc3fa829663c530e/sdks/java/extensions

Re: Question about LOGICAL_AND

2020-11-12 Thread Robin Qiu
Hi Sonam, AND operator is already defined by Calcite and the mapping is here: https://github.com/apache/beam/blob/816017e44e3209d334f4f3b2bc3fa829663c530e/sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/translation/SqlOperatorMappingTable.java#L39. Is this

Re: Question about LOGICAL_AND

2020-11-12 Thread Kyle Weaver
If you're defining a new built-in function in ZetaSQL, you can define an operator for it here: https://github.com/apache/beam/blob/master/sdks/java/extensions/sql/zetasql/src/main/java/org/apache/beam/sdk/extensions/sql/zetasql/translation/SqlOperators.java Then add the operator the table here: ht

Question about LOGICAL_AND

2020-11-12 Thread Sonam Ramchand
There is no LOGICAL_AND operator in SqlStdOperatorTable, is there any other way to implement LOGICAL_AND? -- Regards, *Sonam* Software Engineer Mobile: +92 3088337296