Replace PartitionValues class with record#14796
Replace PartitionValues class with record#14796findinpath wants to merge 2 commits intotrinodb:masterfrom
PartitionValues class with record#14796Conversation
PartitionValues class with record
I posted a simpler fix for this #14799. I am OK changing the |
| { | ||
| return values; | ||
| } | ||
| private record PartitionValues(String... values){ |
There was a problem hiding this comment.
Is PartitionValues no longer immutable?
There was a problem hiding this comment.
True. This change would revert the added immutability in the previous commit. I'll wait for the NPE fix from #14799 to land and use the same logic in the record constructor to make the values actually immutable.
There was a problem hiding this comment.
The arrays can be made immutable by converting them to a list.
Changing the code to work with a constructor for PartitionValues based on list defies the purpose of having a concise way to define a variable number of parameters.
It seems to me that the actual design is much better then the one based on record.
Closing the PR.
Description
Fixes NPE issues caused by the changes introduced in #14742 for copying the partition values list (copying a list containing null values is not supported via guava).
NOTE that
TestHiveGlueMetastoreneeds to be executed with secrets because it tests against AWS Glue.Non-technical explanation
Release notes
(x) This is not user-visible or docs only and no release notes are required.
( ) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text: