[ 
https://issues.apache.org/jira/browse/FLINK-36636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17894489#comment-17894489
 ] 

Wenkai Qi edited comment on FLINK-36636 at 10/31/24 8:37 AM:
-------------------------------------------------------------

Yeah. I am fixing this bug. I plan to implement a comparison function to 
support the data types of Flinkcdc. [~leonard] 


was (Author: JIRAUSER289851):
Yeah. I am fixing this bug. I plan to implement a comparison function to 
support the data types of Flinkcdc.

> Timestamp data can not be compared in cdc pipeline transform
> ------------------------------------------------------------
>
>                 Key: FLINK-36636
>                 URL: https://issues.apache.org/jira/browse/FLINK-36636
>             Project: Flink
>          Issue Type: Bug
>          Components: Flink CDC
>    Affects Versions: cdc-3.2.0
>            Reporter: Wenkai Qi
>            Priority: Major
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> Timestamp data can not be compared in cdc pipeline transform.
> When projecting or filtering code containing timestamp comparisons, the 
> program will encounter errors.
> {code:java}
> TO_TIMESTAMP('2024-01-01 00:00:00') < TO_TIMESTAMP('2024-08-01 00:00:00') 
> {code}
> Error:
> {code:java}
> org.apache.flink.api.common.InvalidProgramException: Expression cannot be 
> compiled. This is a bug. Please file an issue.
> Expression: import static 
> org.apache.flink.cdc.runtime.functions.SystemFunctionUtils.*;toTimestamp("2024-01-01
>  00:00:00", __time_zone__) < toTimestamp("2024-08-01 00:00:00", 
> __time_zone__) ? 1 : 0
> ...
> ...
> Caused by: org.codehaus.commons.compiler.CompileException: Line 1, Column 
> 176: Operator "<" not allowed on reference operands {code}
> There is currently a method that can be temporarily replaced, but I believe 
> it is not in line with user habits.
> {code:java}
> TIMESTAMP_DIFF('SECOND',TO_TIMESTAMP('2024-01-01 00:00:00') , 
> TO_TIMESTAMP('2024-08-01 00:00:00')) > 0 {code}
> Do we need to support comparing timestamps through relational operators, such 
> as
> {code:java}
> > >= < <= {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to