-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ingestion/iceberg): Improve iceberg connector logging #12317
feat(ingestion/iceberg): Improve iceberg connector logging #12317
Conversation
@@ -146,19 +147,40 @@ def get_catalog(self) -> Catalog: | |||
return load_catalog(name=catalog_name, **catalog_config) | |||
|
|||
|
|||
class TopTableTimings: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have you considered using the existing TopKDict
?
class TopKDict(DefaultDict[_KT, _VT]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes but it didn't fit my solution in 100%, I wanted to log some more information than just key of the dictionary, I would need to either make dictionary key a tuple (making it even more prone to errors) or keep reference table, which needs to be printed somehow anyway. I decided this would be the simplest solution.
Codecov ReportAttention: Patch coverage is
... and 6 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even if it's not the TopKDict
, keeping a collection of items sorted by a specific field is a common functionality and so it might be beneficial to define it generically so it can be shared. Keeping it within the iceberg source makes it harder to locate and so used.
I agree this can be understood as early not-needed-yet optimization/generalization. Being this more about personal preference than strong arguments, I'm approving.
Anyway, adding unit tests for the new class, regardless of the approach, would be great for maintaining coverage.
Checklist