All Products
Search
Document Center

Realtime Compute for Apache Flink:Alias

Last Updated:Jun 07, 2024

If you change an alias in an SQL statement for a deployment, the compatibility between the deployment and the state data is not affected.

Note

The impact of changing an alias on the compatibility between a deployment and the state data is not described for subsequent queries.

The following sample code shows how to change an alias.

-- Original SQL statement:
select a, sum(b), max(c) from MyTable group by a;

-- Change alias a to a1.
-- After this modification, the deployment remains fully compatible with the state data. 
select a1, sum(b), max(c) from (select a as a1, b, c from MyTable) group by a1;