Copilot commented on code in PR #7305:
URL: https://github.com/apache/ignite-3/pull/7305#discussion_r2645869418


##########
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; }
+

Review Comment:
   The XML documentation for the Scale property has incorrectly placed tags. 
The summary tag should come before the returns tag, not after. The content 
"Number of digits of scale" should be in the summary tag, not in the returns 
section.
   ```suggestion
       /// Gets the column scale. Number of digits of scale.
       /// </summary>
       int Scale { get; }
   ```



##########
modules/platforms/dotnet/Apache.Ignite/Internal/Table/PartitionManager.cs:
##########
@@ -101,6 +102,11 @@ public ValueTask<IPartition> GetPartitionAsync<TK>(TK key)
         where TK : notnull =>
         GetPartitionInternalAsync(key, 
_table.GetRecordViewInternal<TK>().RecordSerializer.Handler);
 
+    /// <inheritdoc/>
+    public ValueTask<IPartition> GetPartitionAsync<TK>(TK key, IMapper<TK> 
mapper)
+        where TK : notnull =>
+        GetPartitionInternalAsync(key, new 
MapperSerializerHandler<TK>(mapper));
+

Review Comment:
   The mapper parameter is not validated for null. Add null validation using 
IgniteArgumentCheck.NotNull(mapper) to maintain consistency with the SQL API 
implementation and prevent potential NullReferenceException.
   ```suggestion
           where TK : notnull
       {
           IgniteArgumentCheck.NotNull(mapper);
   
           return GetPartitionInternalAsync(key, new 
MapperSerializerHandler<TK>(mapper));
       }
   ```



##########
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 />

Review Comment:
   Empty XML documentation tag. The para tag has no content and should either 
be removed or filled with relevant information about the Precision property.
   ```suggestion
       /// <para>Precision corresponds to the SQL column precision metadata for 
the current column type.</para>
   ```



##########
modules/platforms/dotnet/Apache.Ignite/Compute/JobTarget.cs:
##########
@@ -75,7 +80,23 @@ public static IJobTarget<TKey> Colocated<TKey>(QualifiedName 
tableName, TKey key
     {
         IgniteArgumentCheck.NotNull(key);
 
-        return new ColocatedTarget<TKey>(tableName, key);
+        return new ColocatedTarget<TKey>(tableName, key, null);
+    }
+
+    /// <summary>
+    /// Creates a colocated job target for a specific table and key.
+    /// </summary>
+    /// <param name="tableName">Table name.</param>
+    /// <param name="key">Key.</param>
+    /// <param name="mapper">Mapper for the key.</param>
+    /// <typeparam name="TKey">Key type.</typeparam>
+    /// <returns>Colocated job target.</returns>
+    public static IJobTarget<TKey> Colocated<TKey>(QualifiedName tableName, 
TKey key, IMapper<TKey> mapper)
+        where TKey : notnull
+    {
+        IgniteArgumentCheck.NotNull(key);

Review Comment:
   The mapper parameter is not validated for null. Add null validation using 
IgniteArgumentCheck.NotNull(mapper) to maintain consistency with other 
validation patterns in the codebase and prevent passing null mappers.
   ```suggestion
           IgniteArgumentCheck.NotNull(key);
           IgniteArgumentCheck.NotNull(mapper);
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to