GoogleCloudPlatform / GoogleCloudPlatform/professional-services-data-validator
code cleanup around `get_source_ibis_table` and `get_target_ibis_table` in config_manager.py
- Dominant language
- Python
- Stars
- 524
- Forks
- 171
- Avg merge
- 5d 15h
- Merged PRs (30d)
- 4
Description
Hi,
There is some confusing logic and pre-conditions around these functions. It would be good to have a thorough review and cleanup this code. Specifically [this line](https://github.com/GoogleCloudPlatform/professional-services-data-validator/blob/84824dbd166111c9d511af11d01061ca7f356692/data_validation/config_manager.py#L403) says:
```
if self.validation_type == consts.CUSTOM_QUERY:
self._target_ibis_table = clients.get_ibis_table(
self.target_client, self.target_schema, self.target_table
)
```
When you have a custom query - you don't have a target schema and a target table. So this code will most likely fail. It appears that this code is never executed. To make things more interesting `_target_ibis_table` does not appear to be set anywhere or in other places - so not sure how this would work. Same or similar comments on `_source_ibis_table`.
Things may have evolved since this code was written and this code is no longer needed and could use cleanup. Needs someone with a fresh perspective to review this and cleanup.
Sundar Mudupalli
Contributor guide
Assessment
This issue has not been assessed yet.