tsungchih commented on issue #5202:
URL: https://github.com/apache/gravitino/issues/5202#issuecomment-3059986499

   @jerryshao @unknowntpo I found bugs in instance comparison (dunder method 
`__eq__`) of 
[`ListType`](https://github.com/apache/gravitino/blob/main/clients/client-python/gravitino/api/types/types.py#L817-L823),
 
[`UnionType`](https://github.com/apache/gravitino/blob/main/clients/client-python/gravitino/api/types/types.py#L965-L977),
 and 
[`UnparsedType`](https://github.com/apache/gravitino/blob/main/clients/client-python/gravitino/api/types/types.py#L1018-L1030)
 when developing unit tests of column default value serdes for `ColumnDTO`. The 
intention of the current implementation for each one of them is contrary.
   
   Here's an example from `UnparsedType`.
   
   ```python
          def __eq__(self, other):
               """
               Compares two unparsed_type objects for equality.
   
               Args:
                   other: The other unparsed_type object to compare with.
   
               Returns:
                   True if both unparsed_type objects have the same unparsed 
type string, False otherwise.
               """
               if not isinstance(other, Types.UnparsedType):
                   return self._unparsed_type == other.unparsed_type()
               return False
   ```
   
   The above implementation returns `False` if the data type of `other` is the 
same as the instance itself without comparing anything.
   
   Here are two strategies for us to move forward:
   
   1. Fix them within my next PR together with the column default value serdes.
   2. Raise yet another issue independently for the bug fixes and then get back 
to the PR of column default value serdes.
   
   Which one would you prefer?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to