Add support to provide thrift codec for connector specific fields#25242
Conversation
58c0a15 to
0326cee
Compare
58be3d3 to
8b437b7
Compare
c4c8759 to
fe0490a
Compare
03c06c1 to
4dd32d9
Compare
Can you explain this a bit more? I see as an example
Maybe I'm misunderstanding. From what I see in the code, I only see splits and transaction handles actually participating in the serialization. Other things like table write handles do not, and they are converted into JSON using the old method. I don't think it's OK to leave the framework to omit some connector-specific fields--consider the connector author in C++ needing to JSON serialize some fields, Thrift serialize others. I'm OK to wait for the better solution, which is that all connector specific fields may be serialized by the connector, rather than to have to potentially migrate at a later point in time after production dependencies on this halfway functionality have already been added. |
|
But once again, I think as long as it's connector-dictated and not Presto engine-dictated, that's fine. If we can add the rest of the fields to |
The custom codec is being registered to thrift codec manager and during serde, thrift codec will automatically discover them including the thrift serde for split, transacation handle and all their fields recursively. If you are fine with adding custom serde in ConnectorCodecProvider manually, why not just registering the custom codec for the specific connector and let drift recursively find them. |
The json codec is not available in a static method. But let me give the static method another try. |
|
If it is fine to you, I can remove all hive related changes and only have thrift annotation for presto-main and presto-main-base. |
|
Hey @tdcmeehan Feel free to give this pr another review. Thanks. |
|
Appreciate the follow through, thanks @shangm2! |
Description
TODO: Clean up the json field #25671
To keep the trunk cleaner and also move this pr forward, we had a offline discussion and agree to update this pr with the following items:
ConnectorCodecProviderfor related handles .The original description:
Motivation and Context
prestodb/rfcs#38
Impact
Test Plan
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.