Skip to content
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

refactor: simplify cache, add support for mssql #9938

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

jcrist
Copy link
Member

@jcrist jcrist commented Aug 27, 2024

This:

  • Simplifies the implementation of .cache(). Abstracting things out to a general RefCountedCache led to some hard-to-follow code paths for no added benefit (we weren't using that class anywhere else, and there were no isolated tests for the functionality). Moving to a mixin in the BaseBackend made the methods required a lot easier to follow.
  • Given the simpler code path, I was able to find a bug in the mssql implementation that was preventing support. .cache() now fully works with mssql.

Net decrease in LOC, while adding functionality and tests.

This change was motivated by #6195, which I'll add as a follow-up.

@jcrist jcrist added the ci-run-cloud Add this label to trigger a run of BigQuery, Snowflake, and Databricks backends in CI label Aug 27, 2024
@ibis-docs-bot ibis-docs-bot bot removed the ci-run-cloud Add this label to trigger a run of BigQuery, Snowflake, and Databricks backends in CI label Aug 27, 2024
@jcrist jcrist requested review from cpcloud and gforsyth August 27, 2024 04:29
Copy link
Member

@cpcloud cpcloud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Couple of bits of questions/feedback on the implementation.

ibis/backends/__init__.py Outdated Show resolved Hide resolved
ibis/backends/__init__.py Show resolved Hide resolved
@cpcloud cpcloud added this to the 9.4 milestone Aug 27, 2024
@cpcloud cpcloud added bug Incorrect behavior inside of ibis mssql The Microsoft SQL Server backend labels Aug 27, 2024
@jcrist
Copy link
Member Author

jcrist commented Aug 27, 2024

Hmmm, I thought pre-commit hooks still ran when rebasing? Not sure how that formatting issue slipped through. Anyway, this should be good-to-go.

@cpcloud cpcloud merged commit 1de2f45 into ibis-project:main Aug 27, 2024
81 checks passed
@jcrist jcrist deleted the refactor-cache branch August 27, 2024 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behavior inside of ibis mssql The Microsoft SQL Server backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants