[
https://issues.apache.org/jira/browse/FLINK-12611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16848956#comment-16848956
]
Timo Walther commented on FLINK-12611:
--------------------------------------
Running aggregates like {{SELECT MAX(X)}} should not propagate time attributes.
Currently, we strictly separate time-based operations and materializing
operations. This is also discussed
[here|https://github.com/ververica/sql-training/blob/master/slides/sql-training-02-querying-dynamic-tables.pdf]
(slide 24 and 32). So the concept of time attributes and retract/upsert tables
should be orthogonal.
However, until the time attribute materialization happens, a time attribute
should behave like a regular TIMESTAMP and thus can be nullable.
> Make time indicator nullable in blink
> -------------------------------------
>
> Key: FLINK-12611
> URL: https://issues.apache.org/jira/browse/FLINK-12611
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / Planner
> Reporter: Jingsong Lee
> Assignee: Jingsong Lee
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> SQL: select max(rowtime), count(a) from T
> There will be a AssertionError: type mismatch:
> aggCall type:
> TIMESTAMP(3) NOT NULL
> inferred type:
> TIMESTAMP(3)
> Agg type checking is done before TimeIndicator materializes. So there is a
> exception.
> And before introducing nullable of LogicalType, we should modify this to
> avoid more potential TypeCheck problems.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)