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

fix: adjust lambda_stmt statement tracking #128

Merged
merged 8 commits into from
Feb 4, 2024
Merged

fix: adjust lambda_stmt statement tracking #128

merged 8 commits into from
Feb 4, 2024

Conversation

cofin
Copy link
Member

@cofin cofin commented Feb 3, 2024

This PR disable the tracking of statements that alter the column projections on the following functions:

  • count
  • list_and_count (basic & window)

This statement was causing errors when re-using lambdas for multiple queries.

Resolves #126 #120

@cofin cofin requested review from a team as code owners February 3, 2024 02:50
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

PR Type: Refactoring

PR Summary: The pull request introduces a change in the query construction logic within the advanced_alchemy repository, specifically adjusting the way statements are modified to use a different method for applying conditions to queries. The change affects both the asynchronous and synchronous versions of a method responsible for filtering queries based on a given expression.

Decision: Comment

📝 Type: 'Refactoring' - not supported yet.
  • Sourcery currently only approves 'Typo fix' PRs.
✅ Issue addressed: this change correctly addresses the issue or implements the desired feature.
No details provided.
✅ Small diff: the diff is small enough to approve with confidence.
No details provided.

General suggestions:

  • Verify that the change from filter to where aligns with the intended behavior of the queries and that it does not introduce any regressions or changes in the semantics of the queries that could affect the application's functionality.
  • Consider providing additional context in the PR description about why the change from filter to where is necessary and what benefits it brings to the codebase.
  • Review the use of lambda functions for in-place statement modification to ensure that this approach is the most readable and maintainable. If not, consider refactoring to a more explicit form of statement construction.

Thanks for using Sourcery. We offer it for free for open source projects and would be very grateful if you could help us grow. If you like it, would you consider sharing Sourcery on your favourite social media? ✨

Share Sourcery

Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@cofin cofin changed the title fix: lambda_stmt adjustments fix: adjust lambda_stmt statement tracking Feb 3, 2024
@cofin cofin linked an issue Feb 3, 2024 that may be closed by this pull request
4 tasks
Copy link

sonarcloud bot commented Feb 4, 2024

Copy link

github-actions bot commented Feb 4, 2024

Documentation preview will be available shortly at https://jolt-org.github.io/advanced-alchemy-docs-preview/128

@cofin cofin merged commit 7a54b1a into main Feb 4, 2024
11 checks passed
@cofin cofin deleted the lambda_stmt branch February 4, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: queries using cached argument values Bug: select queries on repositories are not always idempotent
3 participants