Skip to content

Bucketization for IN #36370

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Bucketization for IN #36370

wants to merge 1 commit into from

Conversation

cincuranet
Copy link
Contributor

Closes #36364.

@cincuranet cincuranet force-pushed the buckets branch 4 times, most recently from 082b50e to d419b79 Compare July 15, 2025 09:10
@cincuranet cincuranet marked this pull request as ready for review July 15, 2025 10:01
@cincuranet cincuranet requested a review from a team as a code owner July 15, 2025 10:01
@cincuranet cincuranet requested a review from roji July 15, 2025 10:01
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements bucketization for IN-clause parameters to pad parameter lists to fixed sizes, reducing plan cache bloat, and updates tests to expect the new padded parameter counts.

  • Introduces bucketization logic in SqlNullabilityProcessor and a ParametersPadFactor strategy
  • Adds a helper ExpandParameterIfNeeded to consolidate parameter expansion code
  • Defines MaxParameterCount constant in SqlServerSqlNullabilityProcessor and updates the over-limit check
  • Updates/extends provider-specific functional tests to assert on the padded parameter lists
  • Adds a new relational baseline test for Parameter_collection_Contains_parameter_bucketization

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/EFCore.Relational/Query/SqlNullabilityProcessor.cs Added bucketization code, ParametersPadFactor, and ExpandParameterIfNeeded
src/EFCore.SqlServer/Query/Internal/SqlServerSqlNullabilityProcessor.cs Introduced MaxParameterCount constant and replaced hardcoded threshold
test/EFCore.Relational.Specification.Tests/Query/NonSharedPrimitiveCollectionsQueryRelationalTestBase.cs Added new Parameter_collection_Contains_parameter_bucketization test
test/EFCore.Sqlite.FunctionalTests/Query/NonSharedPrimitiveCollectionsQuerySqliteTest.cs Updated expected SQL for padded parameters in SQLite tests
test/EFCore.SqlServer.FunctionalTests/Query/NonSharedPrimitiveCollectionsQuerySqlServerTest.cs Updated expected SQL for padded parameters in SQL Server tests
test/EFCore.Sqlite.FunctionalTests/... (GearsOfWarQuerySqliteTest.cs) Adjusted IN lists to include padded parameters
test/EFCore.SqlServer.FunctionalTests/... (GearsOfWarQuerySqlServerTest.cs, etc.) Adjusted IN lists to include padded parameters
test/EFCore.SqlServer.FunctionalTests/... (Northwind*QuerySqlServerTest.cs) Adjusted IN lists to include padded parameters
test/EFCore.SqlServer.FunctionalTests/Query/AdHocMiscellaneousQuerySqlServerTest.cs Updated a multi-IN clause to include padded date-time parameters

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.

Bucketization for IN
1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy