Skip to content

Merge upstream#481

Merged
SergeiPavlov merged 77 commits into
master-servicetitanfrom
mergeUpstream
Apr 25, 2026
Merged

Merge upstream#481
SergeiPavlov merged 77 commits into
master-servicetitanfrom
mergeUpstream

Conversation

@SergeiPavlov
Copy link
Copy Markdown
Collaborator

No description provided.

alex-kulakov and others added 25 commits March 30, 2026 15:30
# Conflicts:
#	Orm/Xtensive.Orm.Sqlite/Sql.Drivers.Sqlite/ProviderInitializer.cs
#	Orm/Xtensive.Orm/Orm/EntitySetBase.cs
#	Orm/Xtensive.Orm/Orm/Providers/SqlProvider.cs
#	Orm/Xtensive.Orm/Orm/Rse/Providers/Compilable/AggregateProvider.cs
#	Orm/Xtensive.Orm/Orm/Rse/Providers/Compilable/ApplyProvider.cs
#	Orm/Xtensive.Orm/Orm/Rse/Providers/Compilable/BinaryProvider.cs
#	Orm/Xtensive.Orm/Orm/Rse/Providers/Compilable/CalculateProvider.cs
#	Orm/Xtensive.Orm/Orm/Rse/Providers/Compilable/ContainsTableProvider.cs
#	Orm/Xtensive.Orm/Orm/Rse/Providers/Compilable/ExistenceProvider.cs
#	Orm/Xtensive.Orm/Orm/Rse/Providers/Compilable/IncludeProvider.cs
#	Orm/Xtensive.Orm/Orm/Rse/Providers/Compilable/LockProvider.cs
#	Orm/Xtensive.Orm/Orm/Rse/Providers/Compilable/RawProvider.cs
#	Orm/Xtensive.Orm/Orm/Rse/Providers/Compilable/SelectProvider.cs
#	Orm/Xtensive.Orm/Orm/Rse/Providers/Compilable/StoreProvider.cs
#	Orm/Xtensive.Orm/Orm/Rse/Providers/Compilable/TagProvider.cs
#	Orm/Xtensive.Orm/Orm/Rse/Providers/Compilable/UnaryProvider.cs
#	Orm/Xtensive.Orm/Orm/Rse/Providers/Compilable/VoidProvider.cs
#	Orm/Xtensive.Orm/Orm/Rse/Providers/ExecutableProvider.cs
#	Orm/Xtensive.Orm/Orm/Rse/Providers/Provider.cs
#	Orm/Xtensive.Orm/Orm/Rse/Transformation/ColumnMappingInspector.cs
#	Orm/Xtensive.Orm/Tuples/Transform/CombineTransform.cs
#	Orm/Xtensive.Orm/Tuples/Transform/CutInTransform.cs
#	Orm/Xtensive.Orm/Tuples/Transform/CutOutTransform.cs
#	Orm/Xtensive.Orm/Tuples/Transform/Internals/MapTransformTuple.cs
#	Orm/Xtensive.Orm/Tuples/Transform/MapTransform.cs
#	Orm/Xtensive.Orm/Tuples/Transform/ReadOnlyTransform.cs
#	Orm/Xtensive.Orm/Tuples/Transform/TupleTransformBase.cs
#	Orm/Xtensive.Orm/Tuples/Transform/WrappingTransformTupleBase.cs
# Conflicts:
#	Orm/Xtensive.Orm.Tests.Core/Tuples/Transform/CutInTransformTest.cs
#	Orm/Xtensive.Orm.Tests.Core/Tuples/Transform/MapTransformTest.cs
#	Orm/Xtensive.Orm.Tests.Core/Tuples/Transform/MergeTransformTest.cs
#	Orm/Xtensive.Orm.Tests.Core/Tuples/Transform/ReadOnlyTransformTest.cs
#	Orm/Xtensive.Orm/Linq/ExpressionExtensions.cs
#	Orm/Xtensive.Orm/Orm/Linq/Translator.Expressions.cs
#	Version.props
- Performance tests of constructors
- ToString test for ConcatTransform
- everywhere inside the project transformations are perforemed on valid
  descriptors so we can skip checks of structs, transformations are public though
  so we have to keep validation in public ctor
# Conflicts:
#	ChangeLog/7.2.2-dev.txt
Tuple transformation and Rse.Providers refactoring
@SergeiPavlov SergeiPavlov merged commit 9ec0881 into master-servicetitan Apr 25, 2026
6 checks passed
@SergeiPavlov SergeiPavlov deleted the mergeUpstream branch April 25, 2026 04:42
snaumenko-st added a commit that referenced this pull request Apr 27, 2026
Restore PR #204's lazy normalize-only body. The upstream merge kept
the eager switch+Configure block but routed writes through the lazy
`Data` property, forcing `LazyData` materialization (and the
DO_MAX_1000_COLUMNS guard) at construction time. Deferring layout to
`LazyData` removes the eager 1000-column trip during query translation
and obviates the `RecordSetHeader.Add` workaround.

Made-with: Cursor
snaumenko-st added a commit that referenced this pull request Apr 27, 2026
* Fix QueryTranslationException from RecordSetHeader.Join dead code

Remove an unused `CreateTupleDescriptor(newColumns)` call in
`RecordSetHeader.Join`. After upstream PR #248 changed the return
statement to use the lazy two-arg `TupleDescriptor(a, b)` constructor,
the local `newTupleDescriptor` became dead code. Combined with the
later move of the >1000-column guard into `LazyData` (PR #204), this
dead call eagerly tripped `NotSupportedException` during translation
of complex queries whose transient joined headers exceed 1000 columns,
even when the materialized recordset (after column pruning) would not.

Made-with: Cursor

* Bump DO version

* Fix QueryTranslationException from RecordSetHeader.Add eager validation

Switch `RecordSetHeader.CreateTupleDescriptor` (used by both `Add`
overloads) from `TupleDescriptor.Create` to `TupleDescriptor.CreateFromNormalized`,
matching the lazy normalization pattern already used by `Select` and
the upstream-optimized `Join`. The eager `Create` factory routes to
the single-arg `TupleDescriptor` constructor that synchronously
materializes `LazyData` and trips the >1000-column guard during
query translation, even when the resulting header is transient and
gets pruned before execution. This affected `IncludeProvider`-driven
translations of `Contains`-based predicates over already-wide
intermediate headers (e.g. `e.statusesList.Contains(e.Membership.Status)`
within complex multi-Select/SelectMany/GroupJoin chains).

Add `Xtensive.Orm.Tests.Core/Rse/RecordSetHeaderTest.cs` with
regression tests covering both `Add` overloads, `Join`, and the
preserved runtime guard via `LazyData` access.

Made-with: Cursor

* Update DoVersionSuffix version

* Fix SQL 2100-parameter limit in Bulk Update with large Contains

Auto+TVP path of SqlDml.Variant lost its TvpTypeMapping because the
complex-condition branch always allocated a fresh QueryParameterBinding,
discarding the TVP binding the caller had just created. Reuse the
incoming binding so CommandFactory can switch to a single table-valued
parameter once the collection grows past MaxNumberOfConditions.

Adds regression tests covering Bulk Update Contains over 2200 ids/guids.

Made-with: Cursor

* Fix botched merge of TupleDescriptor single-arg ctor in PR #481

Restore PR #204's lazy normalize-only body. The upstream merge kept
the eager switch+Configure block but routed writes through the lazy
`Data` property, forcing `LazyData` materialization (and the
DO_MAX_1000_COLUMNS guard) at construction time. Deferring layout to
`LazyData` removes the eager 1000-column trip during query translation
and obviates the `RecordSetHeader.Add` workaround.

Made-with: Cursor

* Update DoVersionSuffix version
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.

3 participants