Description:
There is an issue with capturing view definitions in DataHub when schema names in Vertica contain uppercase letters.
Steps to Reproduce:
- Create a schema in Vertica with a mixed-case or uppercase name, for example:
CREATE SCHEMA mySchema2;
- Create a view in this schema
- Attempt to capture view definition from this schema using DataHub.
Expected Behavior:
View definitions should be captured regardless of whether the schema name contains uppercase or lowercase letters.
Actual Behavior:
View definitions are not captured if the schema name contains uppercase letters because the current code compares table_schema using table_schema = lower(any_schema_in_the_database).
Cause:
The table_schema column in V_CATALOG.VIEWS reflects the schema name as it was created. For example, CREATE SCHEMA myschema1; is displayed as myschema1, while CREATE SCHEMA mySchema2; is displayed as mySchema2. The current code does not account for this casing, resulting in missed view definitions.
Solution:
I have submitted a pull request that addresses this issue: #21