[ 
https://issues.apache.org/jira/browse/FLINK-36982?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yanquan Lv updated FLINK-36982:
-------------------------------
    Summary: Failed to run pipeline if using `DATE_FORMAT(CURRENT_TIMESTAMP, 
'yyyy-MM-dd') as datetime` in  (was: Failed to run pipeline if using 
`DATE_FORMAT(NOW(), 'yyyy-MM-dd') as datetime` in)

> Failed to run pipeline if using `DATE_FORMAT(CURRENT_TIMESTAMP, 'yyyy-MM-dd') 
> as datetime` in
> ---------------------------------------------------------------------------------------------
>
>                 Key: FLINK-36982
>                 URL: https://issues.apache.org/jira/browse/FLINK-36982
>             Project: Flink
>          Issue Type: New Feature
>          Components: Flink CDC
>    Affects Versions: cdc-3.2.0, cdc-3.2.1
>            Reporter: Yanquan Lv
>            Priority: Major
>
> h2. How to produce
> {code:java}
> source:
>   type: values
> sink:
>   type: values
> transform: 
>   projection: DATE_FORMAT(CURRENT_TIMESTAMP, 'yyyy-MM-dd') as datetime {code}
> h2. Error Message
> org.apache.flink.util.FlinkRuntimeException: 
> 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.*;dateFormat(currentTimestamp(_{_}epoch_time{_}_),
>  "yyyy-MM-dd")
>  
> at 
> org.apache.flink.cdc.runtime.operators.transform.TransformExpressionCompiler.compileExpression(TransformExpressionCompiler.java:84)
> at 
> org.apache.flink.cdc.runtime.operators.transform.ProjectionColumnProcessor.<init>(ProjectionColumnProcessor.java:71)
> at 
> org.apache.flink.cdc.runtime.operators.transform.ProjectionColumnProcessor.of(ProjectionColumnProcessor.java:83)
>  
> Howerver, the following job file can work well:
> {code:java}
> source:
>   type: values
> sink:
>   type: values
>  
> transform: 
>   projection: DATE_FORMAT(LOCALTIMESTAMP, 'yyyy-MM-dd') as datetime {code}
>  
>  



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

Reply via email to