diff --git a/src/ShardingCore/Sharding/Enumerators/StreamMergeAsync/OrderStreamMergeAsyncEnumerator.cs b/src/ShardingCore/Sharding/Enumerators/StreamMergeAsync/OrderStreamMergeAsyncEnumerator.cs index cf1f9d55..a484793c 100644 --- a/src/ShardingCore/Sharding/Enumerators/StreamMergeAsync/OrderStreamMergeAsyncEnumerator.cs +++ b/src/ShardingCore/Sharding/Enumerators/StreamMergeAsync/OrderStreamMergeAsyncEnumerator.cs @@ -106,6 +106,10 @@ private List GetCurrentOrderValues() { list.Add((IComparable)value); } + else if (value == null) // Support Nullable + { + list.Add(null); + } else { throw new NotSupportedException($"order by value [{order}] must implements IComparable"); @@ -142,4 +146,4 @@ public ValueTask DisposeAsync() #endif } -} \ No newline at end of file +}