Table API and AVG on dates

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Table API and AVG on dates

Flavio Pompermaier
Hi to all,
I'm using Flink 1.6.1 and it seems that average on dates is not supported..am I right?
Is there any effort in implementing it?

Best,
Flavio
Reply | Threaded
Open this post in threaded view
|

Re: Table API and AVG on dates

Hequn Cheng
Hi Flavio,

You are right. Avg on dates is not supported. It requires numeric types. 
As a workaround, you can transform the datetime into a numeric type using an udf. 

Best, Hequn

On Wed, Oct 31, 2018 at 1:51 AM Flavio Pompermaier <[hidden email]> wrote:
Hi to all,
I'm using Flink 1.6.1 and it seems that average on dates is not supported..am I right?
Is there any effort in implementing it?

Best,
Flavio
Reply | Threaded
Open this post in threaded view
|

Re: Table API and AVG on dates

Flavio Pompermaier

On Wed, Oct 31, 2018 at 7:41 AM Hequn Cheng <[hidden email]> wrote:
Hi Flavio,

You are right. Avg on dates is not supported. It requires numeric types. 
As a workaround, you can transform the datetime into a numeric type using an udf. 

Best, Hequn

On Wed, Oct 31, 2018 at 1:51 AM Flavio Pompermaier <[hidden email]> wrote:
Hi to all,
I'm using Flink 1.6.1 and it seems that average on dates is not supported..am I right?
Is there any effort in implementing it?

Best,
Flavio