Add Schema Registry to Provide Table Metadata#263
Add Schema Registry to Provide Table Metadata#263suresh-prakash merged 17 commits intohypertrace:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #263 +/- ##
============================================
+ Coverage 80.28% 80.51% +0.22%
- Complexity 1341 1385 +44
============================================
Files 231 234 +3
Lines 6093 6194 +101
Branches 548 554 +6
============================================
+ Hits 4892 4987 +95
- Misses 826 831 +5
- Partials 375 376 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| DocStoreMetricProvider getDocStoreMetricProvider(); | ||
|
|
||
| default <T extends ColumnMetadata> SchemaRegistry<T> getSchemaRegistry() { | ||
| return null; |
There was a problem hiding this comment.
Prefer Optional instead of nulls. That way, we could avoid errors/bugs where the clients forget NULL handling. By returning Optional, we are forcing the clients to do something with the null.
There was a problem hiding this comment.
Agreed. Changed to optional now.
| connectionConfig.credentials(), | ||
| connectionConfig.applicationName(), | ||
| connectionConfig.connectionPoolConfig(), | ||
| connectionConfig.schemaCacheExpiry(), |
There was a problem hiding this comment.
This change might not be really needed (since all the services have moved to the new way of configuring).
There was a problem hiding this comment.
As discussed, changed this to use customParameters.
Description
This PR introduces a way to get table schema information using the
SchemaRegistryinterface. This interface provides methods to retrieve a table's metadata from the underlying DB. For PG, this is the query that is used:Cache Refresh and Expiry
This registry fetches and caches column metadata from PostgreSQL's
information_schemaon demand. It provides:Testing
[x] Added UTs.
[x] Added integration tests.
Checklist: