[Flink SQL] FLOOR(timestamp TO WEEK) not working

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

[Flink SQL] FLOOR(timestamp TO WEEK) not working

Sebastián Magrí
While using said function in a query I'm getting a query compilation error saying that there's no applicable method for the given arguments. The parameter types displayed in the error are

org.apache.flink.table.data.TimestampData, org.apache.flink.table.data.TimestampData

And there's no overload listed for `org.apache.calcite.runtime.SqlFunctions.floor` that matches those parameters.

Is this supported at all?
Is there anything in particular which should be imported or added to the build to make this work?

--
Sebastián Ramírez Magrí
Reply | Threaded
Open this post in threaded view
|

Re: [Flink SQL] FLOOR(timestamp TO WEEK) not working

Timo Walther
Hi Sebastián,

which Flink version are you using? And which precision do the timestamps
have?

This looks clearly like a bug to me. We should open an issue in JIRA.

Regards,
Timo

On 18.02.21 16:17, Sebastián Magrí wrote:

> While using said function in a query I'm getting a query compilation
> error saying that there's no applicable method for the given arguments.
> The parameter types displayed in the error are
>
> org.apache.flink.table.data.TimestampData,
> org.apache.flink.table.data.TimestampData
>
> And there's no overload listed for
> `org.apache.calcite.runtime.SqlFunctions.floor` that matches those
> parameters.
>
> Is this supported at all?
> Is there anything in particular which should be imported or added to the
> build to make this work?
>
> --
> Sebastián Ramírez Magrí

Reply | Threaded
Open this post in threaded view
|

Re: [Flink SQL] FLOOR(timestamp TO WEEK) not working

Sebastián Magrí
I'm using the latest Flink 1.12 and the timestamps precision is coming from Debezium, which I think is a standard ISO-8601 timestamp.

On Thu, 18 Feb 2021 at 16:19, Timo Walther <[hidden email]> wrote:
Hi Sebastián,

which Flink version are you using? And which precision do the timestamps
have?

This looks clearly like a bug to me. We should open an issue in JIRA.

Regards,
Timo

On 18.02.21 16:17, Sebastián Magrí wrote:
> While using said function in a query I'm getting a query compilation
> error saying that there's no applicable method for the given arguments.
> The parameter types displayed in the error are
>
> org.apache.flink.table.data.TimestampData,
> org.apache.flink.table.data.TimestampData
>
> And there's no overload listed for
> `org.apache.calcite.runtime.SqlFunctions.floor` that matches those
> parameters.
>
> Is this supported at all?
> Is there anything in particular which should be imported or added to the
> build to make this work?
>
> --
> Sebastián Ramírez Magrí



--
Sebastián Ramírez Magrí