Skip to content

Commit dc71462

Browse files
Address code review feedback - add null checks and clarify comments
Co-authored-by: MPCoreDeveloper <37024522+MPCoreDeveloper@users.noreply.github.com>
1 parent 7da0413 commit dc71462

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

SharpCoreDB/DataStructures/HashIndex.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ public class HashIndex
2929
public HashIndex(string tableName, string columnName)
3030
{
3131
_columnName = columnName;
32-
// Use default comparer for now - SimdHashEqualityComparer has platform-specific issues with boxed integers
32+
// Use default comparer: SimdHashEqualityComparer was removed due to issues with
33+
// reference equality vs value equality for boxed value types on Linux/.NET 10.
34+
// May revisit with proper generic implementation in future.
3335
_index = new Dictionary<object, List<long>>();
3436
}
3537

SharpCoreDB/DataStructures/Table.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ private static int CompareObjects(object? a, object? b)
255255
}
256256

257257
// Different types - compare as strings
258-
return string.Compare(a.ToString(), b.ToString(), StringComparison.Ordinal);
258+
return string.Compare(a.ToString() ?? "", b.ToString() ?? "", StringComparison.Ordinal);
259259
}
260260

261261
/// <summary>

0 commit comments

Comments
 (0)