Fabian Hueske created FLINK-39955:
-------------------------------------
Summary: PTF OutputTypeStrategy can emit time indicator types
Key: FLINK-39955
URL: https://issues.apache.org/jira/browse/FLINK-39955
Project: Flink
Issue Type: Sub-task
Components: Table SQL / Planner
Reporter: Fabian Hueske
An OutputTypeStrategy that simply emits the type information of an input table
emits time indicator types if the input table has a time attribute.
However, PTFs should only emit time attributes if the `on_time` argument is
specified and all of this should be managed by the framework.
There's different ways to go about this:
# the framework (via SystemTypeInference) throws if the PTF output type
inference returns a time indicator
# the framework (via SystemTypeInference) converts the time indicator type
into a regular timestamp type before it is handed to the input and output type
strategies
# the framework (via SystemTypeInference) converts any time indicators
returned by an output type strategy automatically into a timestamp type.
IMO, a combination of 1. and 2. is the best approach. It prevents that users
accidentally return a time indicator type (because none are passed in) and
fails if the user manually creates one.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)