This is an automated email from the ASF dual-hosted git repository. ptupitsyn pushed a commit to branch ignite-27278 in repository https://gitbox.apache.org/repos/asf/ignite-3.git
commit ef8474ca7dbb145e1def22bd6a7e05a53382f93d Author: Pavel Tupitsyn <[email protected]> AuthorDate: Wed Dec 24 12:11:55 2025 +0200 wip BasicMappers --- .../platforms/dotnet/Apache.Ignite/Internal/Table/Table.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/platforms/dotnet/Apache.Ignite/Internal/Table/Table.cs b/modules/platforms/dotnet/Apache.Ignite/Internal/Table/Table.cs index 3bb5a7048b4..dc2965ddd12 100644 --- a/modules/platforms/dotnet/Apache.Ignite/Internal/Table/Table.cs +++ b/modules/platforms/dotnet/Apache.Ignite/Internal/Table/Table.cs @@ -153,7 +153,7 @@ namespace Apache.Ignite.Internal.Table /// <inheritdoc/> public IRecordView<T> GetRecordView<T>(IMapper<T> mapper) where T : notnull => - new RecordView<T>(this, new RecordSerializer<T>(this, new MapperSerializerHandler<T>(mapper)), _sql); + GetRecordViewInternal(mapper); /// <inheritdoc/> [RequiresUnreferencedCode(ReflectionUtils.TrimWarning)] @@ -188,6 +188,11 @@ namespace Apache.Ignite.Internal.Table internal RecordView<T> GetRecordViewInternal<T>() where T : notnull { + if (BasicMappers.TryGet<T>() is { } mapper) + { + return GetRecordViewInternal(mapper); + } + // ReSharper disable once HeapView.CanAvoidClosure (generics prevent this) return (RecordView<T>)_recordViews.GetOrAdd( typeof(T), @@ -285,6 +290,10 @@ namespace Apache.Ignite.Internal.Table } } + private RecordView<T> GetRecordViewInternal<T>(IMapper<T> mapper) + where T : notnull => + new(this, new RecordSerializer<T>(this, new MapperSerializerHandler<T>(mapper)), _sql); + private Task<Schema> GetCachedSchemaAsync(int version) { if (_schemas.TryGetValue(version, out var task))
