[
https://issues.apache.org/jira/browse/FLINK-9699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16529664#comment-16529664
]
Fabian Hueske commented on FLINK-9699:
--------------------------------------
I understand the motivation for this feature but I'm not sure whether we should
add it.
Table API queries are translated when they are converted into a
DataStream/DataSet or emitted through a TableSink.
By allowing to replace tables, the following code would behave unexpectedly or
even throw an exception:
{code}
tEnv.registerTable("MyT", dataset);
Table t = tEnv.scan("MyT").select(). // ...;
tEnv.registerTable("MyT", dataset2, true);
DataSet<Row> res = tEnv.toDataSet(t, Row.class); // query will process
dataset2. Might just be different data but also different schema
{code}
For SQL queries it works, because these are immediately translated into logical
plan node which have a reference to the original table.
> Add api to replace registered table
> -----------------------------------
>
> Key: FLINK-9699
> URL: https://issues.apache.org/jira/browse/FLINK-9699
> Project: Flink
> Issue Type: Improvement
> Reporter: Jeff Zhang
> Priority: Major
> Labels: pull-request-available
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)