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


The following commit(s) were added to refs/heads/ignite-27278 by this push:
     new 9959358a886 Fix RowReader to depend on IMapperColumn only for reuse in 
SQL
9959358a886 is described below

commit 9959358a886ceeb92c58fbcb09dfe22c3e2f3e56
Author: Pavel Tupitsyn <[email protected]>
AuthorDate: Tue Dec 23 13:42:25 2025 +0200

    Fix RowReader to depend on IMapperColumn only for reuse in SQL
---
 .../dotnet/Apache.Ignite/Internal/Table/Column.cs  |  3 +++
 .../Table/Serialization/MapperSerializerHandler.cs |  7 +++----
 .../Apache.Ignite/Table/Mapper/IMapperColumn.cs    | 24 ++++++++++++++++++++++
 .../dotnet/Apache.Ignite/Table/Mapper/RowReader.cs | 10 ++++-----
 4 files changed, 35 insertions(+), 9 deletions(-)

diff --git a/modules/platforms/dotnet/Apache.Ignite/Internal/Table/Column.cs 
b/modules/platforms/dotnet/Apache.Ignite/Internal/Table/Column.cs
index 1cc14c5142c..8fc3ab2f7a8 100644
--- a/modules/platforms/dotnet/Apache.Ignite/Internal/Table/Column.cs
+++ b/modules/platforms/dotnet/Apache.Ignite/Internal/Table/Column.cs
@@ -44,6 +44,9 @@ internal record Column(
     /// </summary>
     public bool IsColocation => ColocationIndex >= 0;
 
+    /// <inheritdoc/>
+    public bool Nullable => IsNullable;
+
     /// <summary>
     /// Gets the column index within a binary tuple.
     /// </summary>
diff --git 
a/modules/platforms/dotnet/Apache.Ignite/Internal/Table/Serialization/MapperSerializerHandler.cs
 
b/modules/platforms/dotnet/Apache.Ignite/Internal/Table/Serialization/MapperSerializerHandler.cs
index 06c7b502c54..46aa17f761d 100644
--- 
a/modules/platforms/dotnet/Apache.Ignite/Internal/Table/Serialization/MapperSerializerHandler.cs
+++ 
b/modules/platforms/dotnet/Apache.Ignite/Internal/Table/Serialization/MapperSerializerHandler.cs
@@ -52,12 +52,11 @@ internal sealed class MapperSerializerHandler<T> : 
IRecordSerializerHandler<T>
     /// <inheritdoc/>
     public T Read(ref MsgPackReader reader, Schema schema, bool keyOnly = 
false)
     {
-        Column[] columns = schema.GetColumnsFor(keyOnly);
-        var binaryTupleReader = new BinaryTupleReader(reader.ReadBinary(), 
columns.Length);
-
-        var mapperReader = new RowReader(ref binaryTupleReader, columns);
         IMapperSchema mapperSchema = schema.GetMapperSchema(keyOnly);
 
+        var binaryTupleReader = new BinaryTupleReader(reader.ReadBinary(), 
mapperSchema.Columns.Count);
+        var mapperReader = new RowReader(ref binaryTupleReader, 
mapperSchema.Columns);
+
         return _mapper.Read(ref mapperReader, mapperSchema);
     }
 
diff --git 
a/modules/platforms/dotnet/Apache.Ignite/Table/Mapper/IMapperColumn.cs 
b/modules/platforms/dotnet/Apache.Ignite/Table/Mapper/IMapperColumn.cs
index b83019f2a92..6d3a57133be 100644
--- a/modules/platforms/dotnet/Apache.Ignite/Table/Mapper/IMapperColumn.cs
+++ b/modules/platforms/dotnet/Apache.Ignite/Table/Mapper/IMapperColumn.cs
@@ -33,4 +33,28 @@ public interface IMapperColumn
     /// Gets the column type.
     /// </summary>
     ColumnType Type { get; }
+
+    /// <summary>
+    /// Gets the column precision, or -1 when not applicable to the current 
column type.
+    /// <para />
+    /// </summary>
+    /// <returns>
+    /// Number of decimal digits for exact numeric types; number of decimal 
digits in mantissa for approximate numeric types;
+    /// number of decimal digits for fractional seconds of datetime types; 
length in characters for character types;
+    /// length in bytes for binary types; length in bits for bit types; 1 for 
BOOLEAN; -1 if precision is not valid for the type.
+    /// </returns>
+    int Precision { get; }
+
+    /// <summary>
+    /// Gets the column scale.
+    /// <returns>
+    /// </returns>
+    /// Number of digits of scale.
+    /// </summary>
+    int Scale { get; }
+
+    /// <summary>
+    /// Gets a value indicating whether the column is nullable.
+    /// </summary>
+    bool Nullable { get; }
 }
diff --git a/modules/platforms/dotnet/Apache.Ignite/Table/Mapper/RowReader.cs 
b/modules/platforms/dotnet/Apache.Ignite/Table/Mapper/RowReader.cs
index 74a1d988793..26b2baf4ff3 100644
--- a/modules/platforms/dotnet/Apache.Ignite/Table/Mapper/RowReader.cs
+++ b/modules/platforms/dotnet/Apache.Ignite/Table/Mapper/RowReader.cs
@@ -18,9 +18,9 @@
 namespace Apache.Ignite.Table.Mapper;
 
 using System;
+using System.Collections.Generic;
 using Internal.Common;
 using Internal.Proto.BinaryTuple;
-using Internal.Table;
 using NodaTime;
 using Sql;
 
@@ -31,7 +31,7 @@ public ref struct RowReader
 {
     private readonly BinaryTupleReader _reader;
 
-    private readonly Column[] _columns;
+    private readonly IReadOnlyList<IMapperColumn> _columns;
 
     private int _position = -1;
 
@@ -40,17 +40,17 @@ public ref struct RowReader
     /// </summary>
     /// <param name="reader">Reader.</param>
     /// <param name="columns">Columns.</param>
-    internal RowReader(ref BinaryTupleReader reader, Column[] columns)
+    internal RowReader(ref BinaryTupleReader reader, 
IReadOnlyList<IMapperColumn> columns)
     {
         _reader = reader;
         _columns = columns;
     }
 
-    private readonly Column Column
+    private readonly IMapperColumn Column
     {
         get
         {
-            if (_position >= _columns.Length)
+            if (_position >= _columns.Count)
             {
                 throw new IgniteClientException(
                     ErrorGroups.Client.Configuration,

Reply via email to