-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLINK-13318][table-planner-blink] Fix Blink planner tests failing on Scala 2.12 by setting SerialVersionUID of UDF explicitly #9193
Conversation
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit c49cd6f (Tue Aug 06 15:45:52 UTC 2019) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @beyond1920 , Overall looks good to me.
Can you rename the title to align with the root cause?
@wuchong Updated title. Thanks |
@beyond1920 why are only Blink tests affected by this? We also have Scala functions without version ID. Actually I doubt if we should force users to set this. We are not really using it because the serialization is only for shipping to the cluster. |
Hi @twalthr , this is because
That's why we add version id to all existing scala udfs. But this doesn't mean we force users to set this. This is just a workaround for the plan test for different Scala versions. Users can still use a Scala udf without version id in blink planner and flink planner.
Flink uses |
+1 to wuchong's opinion. |
Thanks for the explanation @wuchong. +1 to the changes from my side. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
… Scala 2.12 by setting SerialVersionUID to Scala UDFs This is because: 1. we print the udf's md5 into the node explanation 2. blink planner uses XML to verify plan, the XML content is immutable between different Scala versions 3. the serialization behavior is different between Scala 2.11 and 2.12 when version id is not defined. That's why we add version id to all existing scala udfs. But this doesn't mean we force users to set this. This is just a workaround for the plan test for different Scala versions. Users can still use a Scala udf without version id in blink planner and flink planner. This closes #9193
What is the purpose of the change
Fix Blink planner tests failing on Scala 2.12. Some query plan in Scala 2.12 is different with that in Scala 2.11 if it contains udf without SerialVersionUID explicitly.
Brief change log
Add SerialVersionUID for all
UserDefinedFunction
s in blink planner which is Scala language.Verifying this change
Existed UT, IT
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: noDocumentation