yux created FLINK-35651:
---------------------------
Summary: Unable to call argument-less built-in functions with
parentheses
Key: FLINK-35651
URL: https://issues.apache.org/jira/browse/FLINK-35651
Project: Flink
Issue Type: Bug
Components: Flink CDC
Reporter: yux
Currently, CDC Pipeline transform module handles some built-in functions
specially, including LOCALTIME, LOCALTIMESTAMP, CURRENT_TIME, CURRENT_DATE, and
CURRENT_TIMESTAMP.
In SystemFunctionUtils implementation, they have arguments actually, but are
silently bound to current _{_}epoch_time{_}_ and _{_}time_zone{_}_ variable.
However, user could not call these functions with parentheses directly because
function signature doesn't match.
For example,
```yaml
transform:
- projection: CURRENT_TIMESTAMP AS TS
```
is OK since it was automatically expanded to something like
`currentTimestamp(_{_}epoch_time{_}{_}, __time_zone{_}_)`.
But for this definition:
```yaml
transform:
- projection: CURRENT_TIMESTAMP() AS TS
```
Transform will fail at runtime:
> org.apache.calcite.runtime.CalciteContextException: From line 1, column 12 to
> line 1, column 30: No match found for function signature CURRENT_TIMESTAMP()
which could be quite confusing to users.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)