You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "snuyanzin (via GitHub)" <gi...@apache.org> on 2026/09/11 06:56:58 UTC

[PR] [FLINK-40631][table] Pin `serialVersionUID` in `Variant` [flink]

snuyanzin opened a new pull request, #29158:
URL: https://github.com/apache/flink/pull/29158

   ## What is the purpose of the change
   
   There was missing `serialVersionUID` in `Variant` leading to issues in store/restore tests
   the is fixing that
   
   ## Brief change log
   
   Variant
   
   ## Verifying this change
   
   existing tests
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
     - The serializers: (no)
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (no)
     - If yes, how is the feature documented? (not applicable)
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   <!--
   If generative AI tooling has been used in the process of authoring this PR, please
   change the checkbox below to `[X]` and replace the placeholder in the "Generated-by"
   line with the tool name and version. Otherwise remove the "Generated-by" line.
   See the ASF Generative Tooling Guidance for details:
   https://www.apache.org/legal/generative-tooling.html
   
   You are responsible for the quality and correctness of every change in this PR
   regardless of the tooling used. Low-effort AI-generated PRs will be closed. See
   AGENTS.md for the full guidance.
   -->
   
   - [ ] Yes (please specify the tool below)
   
   Generated-by: [Tool Name and Version]
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-40631][table] Pin `serialVersionUID` in `Variant` [flink]

Posted by "snuyanzin (via GitHub)" <gi...@apache.org>.
snuyanzin commented on code in PR #29158:
URL: https://github.com/apache/flink/pull/29158#discussion_r3987576896


##########
flink-core/src/main/java/org/apache/flink/types/variant/Variant.java:
##########
@@ -38,6 +38,9 @@
 @PublicEvolving
 public interface Variant extends Serializable {
 
+    /** Pinned so interface changes don't alter the UID and break restore of VARIANT state. */
+    long serialVersionUID = 1L;

Review Comment:
   @davidradl how?
   
   it was made serializable only in 2.4.0 which is not released yet
   see https://issues.apache.org/jira/browse/FLINK-37977



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-40631][table] Pin `serialVersionUID` in `Variant` [flink]

Posted by "snuyanzin (via GitHub)" <gi...@apache.org>.
snuyanzin merged PR #29158:
URL: https://github.com/apache/flink/pull/29158


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-40631][table] Pin `serialVersionUID` in `Variant` [flink]

Posted by "snuyanzin (via GitHub)" <gi...@apache.org>.
snuyanzin commented on code in PR #29158:
URL: https://github.com/apache/flink/pull/29158#discussion_r3987916103


##########
flink-core/src/main/java/org/apache/flink/types/variant/Variant.java:
##########
@@ -38,6 +38,9 @@
 @PublicEvolving
 public interface Variant extends Serializable {
 
+    /** Pinned so interface changes don't alter the UID and break restore of VARIANT state. */
+    long serialVersionUID = 1L;

Review Comment:
   see the code for 2.3.
   https://github.com/apache/flink/blob/bad821cb2091433d43a04c8109c515ba84d23a0e/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/serde/LogicalTypeJsonSerializer.java#L153-L257
   
   you can not even serialize it to get savepoint



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-40631][table] Pin `serialVersionUID` in `Variant` [flink]

Posted by "davidradl (via GitHub)" <gi...@apache.org>.
davidradl commented on code in PR #29158:
URL: https://github.com/apache/flink/pull/29158#discussion_r3987537923


##########
flink-core/src/main/java/org/apache/flink/types/variant/Variant.java:
##########
@@ -38,6 +38,9 @@
 @PublicEvolving
 public interface Variant extends Serializable {
 
+    /** Pinned so interface changes don't alter the UID and break restore of VARIANT state. */
+    long serialVersionUID = 1L;

Review Comment:
   I see this looks cleaner, but I assume this will break existing savepoints that will have a different serialization id.  



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-40631][table] Pin `serialVersionUID` in `Variant` [flink]

Posted by "snuyanzin (via GitHub)" <gi...@apache.org>.
snuyanzin commented on code in PR #29158:
URL: https://github.com/apache/flink/pull/29158#discussion_r3987916103


##########
flink-core/src/main/java/org/apache/flink/types/variant/Variant.java:
##########
@@ -38,6 +38,9 @@
 @PublicEvolving
 public interface Variant extends Serializable {
 
+    /** Pinned so interface changes don't alter the UID and break restore of VARIANT state. */
+    long serialVersionUID = 1L;

Review Comment:
   see the code for 2.3.
   https://github.com/apache/flink/blob/bad821cb2091433d43a04c8109c515ba84d23a0e/flink-table/flink-sql-gateway/src/main/java/org/apache/flink/table/gateway/rest/serde/LogicalTypeJsonSerializer.java#L186-L190
   
   you can not even serialize it to get savepoint



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [FLINK-40631][table] Pin `serialVersionUID` in `Variant` [flink]

Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #29158:
URL: https://github.com/apache/flink/pull/29158#issuecomment-5630861893

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "3f500d49fc0bf07bf7bec754ab52269754f441b8",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "3f500d49fc0bf07bf7bec754ab52269754f441b8",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 3f500d49fc0bf07bf7bec754ab52269754f441b8 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org