[#8940] improvement(core): Support serialize/deserialize for distributionImpl and sortOrderImpl#8975
Conversation
| gen.writeEndObject(); | ||
| } | ||
|
|
||
| private static void writeExpression(Expression expression, JsonGenerator gen) throws IOException { |
There was a problem hiding this comment.
I guess the implementation is quite similar to xxxDTO serde, maybe we can reuse the code. Otherwise, we have to change twice.
Another solution is that when we store these into the database, we can convert the xxxImpl to xxxDTO, and then using the existing serde method to do the serialization and deserialization. With this, we don't have to implement the serde method for these xxxImpl.
There was a problem hiding this comment.
In the first edition, I have just converted Impl to DTO and reused the DTO serializer and deserializer to handle it. However, since DTO and Impl play different roles, I chose to create new serializers finally. Theoretically, both are okay.
There was a problem hiding this comment.
Let's do the second one if there's no objection, cc @mchades .
8782b30
into
apache:branch-lance-namepspace-dev
…stributionImpl and sortOrderImpl (apache#8975) ### What changes were proposed in this pull request? - Add serializer and deserializer for class `DistributionImpl` and `SortOrderImpl` - Optimize sortOrderImpl serialization. ### Why are the changes needed? It's a improvment. Fix: apache#8940 ### Does this PR introduce _any_ user-facing change? N/A. ### How was this patch tested? UTs and ITs.
…stributionImpl and sortOrderImpl (apache#8975) ### What changes were proposed in this pull request? - Add serializer and deserializer for class `DistributionImpl` and `SortOrderImpl` - Optimize sortOrderImpl serialization. ### Why are the changes needed? It's a improvment. Fix: apache#8940 ### Does this PR introduce _any_ user-facing change? N/A. ### How was this patch tested? UTs and ITs.
What changes were proposed in this pull request?
DistributionImplandSortOrderImplWhy are the changes needed?
It's a improvment.
Fix: #8940
Does this PR introduce any user-facing change?
N/A.
How was this patch tested?
UTs and ITs.