Re: Table API and registration of DataSet/DataStream
Posted by
Fabian Hueske-2 on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/Table-API-and-registration-of-DataSet-DataStream-tp15492p15502.html
Hi Flavio,
I tried to follow your example. If I got it right, you would like to change the registered table by assigning a different DataStream to the original myDs variable.
With registerDataStream("test", myDs, ...) you don't register the variable myDs as a table but it's current value, i.e., a reference to a DataStream object.
By changing the value of myDs, you just override the reference in myDs but do not change the reference that was registered in Calcite's catalog.
This is common behavior in many programming languages including Java.
Right now, there is no way to change or override a registered table. We had this functionality once, but had to remove it after a Calcite version upgrade.
Can you use a new TableEnvironment and register the new table there?
Best, Fabian