-
Notifications
You must be signed in to change notification settings - Fork 93
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
fix(datasets): share the cache of Ibis connections #941
Conversation
d01ac44
to
2c54abc
Compare
Quoting this for future reference. This is not just a refactoring, but necessary as temp table are only accessible by the same connection. |
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.
Non blocking comment from the peanut gallery: Are there other ways of doing this without using Mixins?
I think we should do less inheritance, not more. Let alone multiple inheritance.
2448b80
to
05da4d6
Compare
I'm not 100% sure what the best alternative would be, and would need to do some reading/experimentation to figure it out. That said, I think this can definitely be refactored down the road, as it doesn't update the public interface. Edit: https://python-patterns.guide/gang-of-four/composition-over-inheritance/ also has some ideas? But I haven't looked into it sufficiently to see what I may like. |
Blocked by #949 |
Signed-off-by: Deepyaman Datta <[email protected]>
Signed-off-by: Deepyaman Datta <[email protected]>
Signed-off-by: Deepyaman Datta <[email protected]>
05da4d6
to
449a017
Compare
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.
Happy with solution 👍 I do agree it would be good to see if we can achieve the same without inheritance, but since it's now only used between the Ibis datasets I don't see it as too big of an issue.
Should this be added to the release notes?
Yes, will do! |
Signed-off-by: Deepyaman Datta <[email protected]>
Description
Close #935
Development notes
The
ConnectionMixin
can also be used by something likepandas.SQLQueryDataset
andpandas.SQLTableDataset
to share a single connection cache. While this has some value (prevent storing the connections twice, if the user is using both datasets), it's less functionally important as in this specific Ibis case.Checklist
RELEASE.md
file