Search code examples
apache-flinkflink-sql

The new state serializer must not be incompatible with the old state serializer in Apche Flink SQL


I am reading data from Flink Datastream using Kafka (reading from multiple streams), then i am converting those streams in to temporary View using flink SQL and perform join operations. For join operations also, i am using Flink SQL. The problem I am facing is when i am adding new field in flink sql query, and then trying to migrate savepoint, I am having this error:

Caused by: org.apache.flink.util.StateMigrationException: The new state serializer (org.apache.flink.api.common.typeutils.base.MapSerializer@58eac6c9) must not be incompatible with the old state serializer (org.apache.flink.api.common.typeutils.base.MapSerializer@a56de33a).

Note: When I checked, this error is coming when i changed the query and not the pojo of the datastream.


Solution

  • There is no support for query evolution in Flink SQL, as highlighted in the documentation https://nightlies.apache.org/flink/flink-docs-master/docs/ops/upgrading/#table-api--sql

    A change in your SQL query means that you'll have to restart without a savepoint.