-
Notifications
You must be signed in to change notification settings - Fork 442
[#5202] feat(client-python): Support Column and its default value part2 - type serializer #6903
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
base: main
Are you sure you want to change the base?
[#5202] feat(client-python): Support Column and its default value part2 - type serializer #6903
Conversation
for implementing various customized DataClassJson serializer/deserializer apache#5202 Signed-off-by: George T. C. Lai <[email protected]>
aimed at facilitating customized DataClassJson serializer/descrializer apache#5202 Signed-off-by: George T. C. Lai <[email protected]>
add write data type in SerdesUtils apache#5202 Signed-off-by: George T. C. Lai <[email protected]>
add TypeSerializer apache#5202 Signed-off-by: George T. C. Lai <[email protected]>
add unit tests for TypesSerializer apache#5202 Signed-off-by: George T. C. Lai <[email protected]>
add write struct type in SerdesUtils apache#5202 Signed-off-by: George T. C. Lai <[email protected]>
add unit tests for serializing struct type apache#5202 Signed-off-by: George T. C. Lai <[email protected]>
def test_list_type_of_primitive_and_none_types_serdes(self): for simple_string, type_ in self._primitive_and_none_types.items(): list_type = Types.ListType.of(element_type=type_, element_nullable=False) serialized_result = TypesSerdes.serialize(list_type) self.assertEqual(serialized_result.get(SerdesUtils.TYPE), SerdesUtils.LIST) self.assertEqual( serialized_result.get(SerdesUtils.LIST_ELEMENT_TYPE), simple_string ) self.assertEqual( serialized_result.get(SerdesUtils.LIST_ELEMENT_NULLABLE), False ) apache#5202 Signed-off-by: George T. C. Lai <[email protected]>
add unit tests for serializing list type apache#5202 Signed-off-by: George T. C. Lai <[email protected]>
add write map type in SerdesUtils apache#5202 Signed-off-by: George T. C. Lai <[email protected]>
add unit tests for serializing map type apache#5202 Signed-off-by: George T. C. Lai <[email protected]>
add write union type in SerdesUtils apache#5202 Signed-off-by: George T. C. Lai <[email protected]>
add unit tests for serializing union type apache#5202 Signed-off-by: George T. C. Lai <[email protected]>
add write external type in SerdesUtils apache#5202 Signed-off-by: George T. C. Lai <[email protected]>
add unit tests for serializing external type apache#5202 Signed-off-by: George T. C. Lai <[email protected]>
add write unparsed type in SerdesUtils apache#5202 Signed-off-by: George T. C. Lai <[email protected]>
add unit tests for serializing unparsed type apache#5202 Signed-off-by: George T. C. Lai <[email protected]>
revise TypeVar names to conform with naming patterns apache#5202 Signed-off-by: George T. C. Lai <[email protected]>
@tsungchih Could you explain why you need to implement a
Reference: |
@unknowntpo Thanks for your comments. That is because all of the current Gravitino IMHO, here comes with two solutions to serialize/deserialize
I'm going to elaborate more by taking
We may have it to support for
Note that, however, the Regards |
What changes were proposed in this pull request?
This is the second part (totally 4 planned) of implementation to the following classes from Java to support Column and its default value, including:
The
TypeSerializer
will be used in the incomingColumnDTO
implementation to serializedata_type
field.Why are the changes needed?
We need to support Column and its default value in python client.
#5202
Does this PR introduce any user-facing change?
No
How was this patch tested?
Unit tests