ian910297 commented on issue #3767: URL: https://github.com/apache/gravitino/issues/3767#issuecomment-2209151590
@noidname01 I've outlined some scenarios, but I'd like to discuss them before writing the code. 1. exception Exception declarations are scattered across multiple files. I want to consolidate them into a single file, base.py, located at clients/clitent-python/gravitino/exceptions/base.py. There are also identically named exception classes in gravitino.client.gravitino_client and gravitino.client.gravitino_metalake, which I will also include in base.py. reference: [[SPARK-42342][PYTHON][CONNECT] Introduce base hierarchy to exceptions #39882](https://github.com/apache/spark/pull/39882) 2. Unit and integration tests are allowed to have duplicate code in specific files. ``` audit_dto = AuditDTO( _creator="test", _create_time="2022-01-01T00:00:00Z", _last_modifier="test", _last_modified_time="2024-04-05T10:10:35.218Z", ) ``` 3. no idea: how to refactor the getter function of private variables This code doesn't look very Pythonic. If we want to remove the duplication, we may need to rewrite it more systematically. ``` @dataclass class SetProperty: """A fileset change to set the property and value for the fileset.""" _property: str = field(metadata=config(field_name="property")) _value: str = field(metadata=config(field_name="value")) def property(self): """Retrieves the name of the property being set in the fileset. Returns: The name of the property. """ return self._property ``` -- 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]
