Skip to content

Add regression for nullable searchable contains query#563

Open
slorello89 wants to merge 1 commit intomainfrom
fix/issue-536-exception-while-executing-search
Open

Add regression for nullable searchable contains query#563
slorello89 wants to merge 1 commit intomainfrom
fix/issue-536-exception-while-executing-search

Conversation

@slorello89
Copy link
Member

@slorello89 slorello89 commented Mar 18, 2026

Issue #536\n\nSummary: add regression coverage for a nullable searchable-field query with a projection and explicit null guard. The current code path serializes to a valid Redis query for the guarded form, so this change locks that behavior in as a regression test.\n\nRoot cause: the issue report shows a malformed query shape around and . On current HEAD, the explicit path serializes correctly; I could not reproduce the live Redis syntax failure for that guarded form.\n\nFix: add a focused unit regression in covering with a projection.\n\nTests: Determining projects to restore...
All projects are up-to-date for restore.
Redis.OM -> /private/tmp/redis-om-dotnet-issue-536/src/Redis.OM/bin/Debug/netstandard2.0/Redis.OM.dll
Successfully created package '/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM/bin/Debug/Redis.OM.1.1.0.nupkg'.
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/RedisConnectionExtensions.cs(10,24): warning CS0436: The type 'RedisConnection' in '/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/RedisConnection.cs' conflicts with the imported type 'RedisConnection' in 'Redis.OM, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null'. Using the type defined in '/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/RedisConnection.cs'. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/PendingConsumer.cs(25,28): warning CS8601: Possible null reference assignment. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/PendingConsumer.cs(23,18): warning CS8618: Non-nullable property 'ConsumerName' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/RedisConnection.cs(24,16): warning CS8618: Non-nullable field '_db' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(84,30): warning CS8604: Possible null reference argument for parameter 'key' in 'void IDictionary<string, IDictionary<string, string>>.Add(string key, IDictionary<string, string> value)'. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(112,26): warning CS8600: Converting null literal or possible null value to non-nullable type. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(113,30): warning CS8600: Converting null literal or possible null value to non-nullable type. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(115,37): warning CS8602: Dereference of a possibly null reference. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(119,30): warning CS8604: Possible null reference argument for parameter 'key' in 'void IDictionary<string, IDictionary<string, string>>.Add(string key, IDictionary<string, string> value)'. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(22,24): warning CS8600: Converting null literal or possible null value to non-nullable type. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(23,38): warning CS8600: Converting null literal or possible null value to non-nullable type. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(23,38): warning CS8602: Dereference of a possibly null reference. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(25,30): warning CS8602: Dereference of a possibly null reference. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(25,22): warning CS8600: Converting null literal or possible null value to non-nullable type. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(32,39): warning CS8602: Dereference of a possibly null reference. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(32,24): warning CS8600: Converting null literal or possible null value to non-nullable type. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(33,33): warning CS8602: Dereference of a possibly null reference. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(35,35): warning CS8600: Converting null literal or possible null value to non-nullable type. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(35,35): warning CS8602: Dereference of a possibly null reference. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(35,26): warning CS8600: Converting null literal or possible null value to non-nullable type. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(36,46): warning CS8600: Converting null literal or possible null value to non-nullable type. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(36,46): warning CS8602: Dereference of a possibly null reference. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(36,30): warning CS8600: Converting null literal or possible null value to non-nullable type. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(38,37): warning CS8602: Dereference of a possibly null reference. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(40,38): warning CS8600: Converting null literal or possible null value to non-nullable type. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(40,38): warning CS8604: Possible null reference argument for parameter 'key' in 'void Dictionary<string, RedisReply>.Add(string key, RedisReply value)'. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XRangeResponse.cs(42,30): warning CS8604: Possible null reference argument for parameter 'key' in 'void IDictionary<string, T>.Add(string key, T value)'. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/RespHelper.cs(92,24): warning CS8603: Possible null reference return. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/RespHelper.cs(103,24): warning CS8603: Possible null reference return. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XPendingReply.cs(33,32): warning CS8601: Possible null reference assignment. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XPendingReply.cs(34,33): warning CS8601: Possible null reference assignment. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XPendingReply.cs(31,18): warning CS8618: Non-nullable property 'SmallestPendingId' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XPendingReply.cs(31,18): warning CS8618: Non-nullable property 'LargestPendingId' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/StreamGroupInfo.cs(28,31): warning CS8601: Possible null reference assignment. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/StreamGroupInfo.cs(23,18): warning CS8618: Non-nullable property 'LastDeliveredId' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XPendingMessage.cs(27,25): warning CS8601: Possible null reference assignment. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XPendingMessage.cs(28,28): warning CS8601: Possible null reference assignment. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XPendingMessage.cs(25,16): warning CS8618: Non-nullable property 'MessageId' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XPendingMessage.cs(25,16): warning CS8618: Non-nullable property 'ConsumerName' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XAutoClaimResponse.cs(24,23): warning CS8600: Converting null literal or possible null value to non-nullable type. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XAutoClaimResponse.cs(24,23): warning CS8601: Possible null reference assignment. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/XAutoClaimResponse.cs(22,16): warning CS8618: Non-nullable property 'NextId' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the property as nullable. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/StreamInfoFull.cs(24,17): warning CS8604: Possible null reference argument for parameter 'key' in 'KeyValuePair<string, IDictionary<string, string>>.KeyValuePair(string key, IDictionary<string, string> value)'. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/StreamInfoFull.cs(27,17): warning CS8604: Possible null reference argument for parameter 'key' in 'KeyValuePair<string, IDictionary<string, string>>.KeyValuePair(string key, IDictionary<string, string> value)'. [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/RedisConnection.cs(21,36): warning CS0649: Field 'RedisConnection._db' is never assigned to, and will always have its default value null [/private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/Redis.OM.POC.csproj]
Redis.OM.POC -> /private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.POC/bin/Debug/netstandard2.0/Redis.OM.POC.dll
Redis.OM.Vectorizers -> /private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.Vectorizers/bin/Debug/net7.0/Redis.OM.Vectorizers.dll
Redis.OM.Vectorizers -> /private/tmp/redis-om-dotnet-issue-536/src/Redis.OM.Vectorizers/bin/Debug/net6.0/Redis.OM.Vectorizers.dll
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Serialization/ObjectWithZeroStopwords.cs(11,22): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net6.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/RediSearchTests/ObjectWithNullableStrings.cs(40,18): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net6.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/RediSearchTests/ObjectWithNullableStrings.cs(43,18): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net6.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/RediSearchTests/ObjectWithNullableStrings.cs(16,18): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net6.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/RediSearchTests/ObjectWithNullableStrings.cs(19,18): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net6.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/RediSearchTests/Person.cs(78,22): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net6.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/RediSearchTests/AggregationFunctionalTests.cs(214,63): warning CS4014: Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net6.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/RediSearchTests/ReducerTests.cs(804,63): warning CS4014: Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net6.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/ConnectionTests.cs(10,24): warning CS0414: The field 'ConnectionTests.SENTINEL_CONNECTION_STRING' is assigned but its value is never used [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net6.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/ConnectionTests.cs(9,24): warning CS0414: The field 'ConnectionTests.STANDALONE_CONNECTION_STRING' is assigned but its value is never used [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net6.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/RediSearchTests/SearchFunctionalTests.cs(1185,21): warning xUnit1013: Public method 'CompareTimestamps' on test class 'SearchFunctionalTests' should be marked as a Theory. (https://xunit.github.io/xunit.analyzers/rules/xUnit1013) [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net6.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/ConfigurationTests.cs(109,13): warning xUnit2012: Do not use Enumerable.Any() to check if a value exists in a collection. (https://xunit.github.io/xunit.analyzers/rules/xUnit2012) [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net6.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/ConfigurationTests.cs(110,13): warning xUnit2012: Do not use Enumerable.Any() to check if a value exists in a collection. (https://xunit.github.io/xunit.analyzers/rules/xUnit2012) [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net6.0]
Redis.OM.Unit.Tests -> /private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/bin/Debug/net6.0/Redis.OM.Unit.Tests.dll
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Serialization/ObjectWithZeroStopwords.cs(11,22): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net7.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/RediSearchTests/ObjectWithNullableStrings.cs(40,18): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net7.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/RediSearchTests/ObjectWithNullableStrings.cs(43,18): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net7.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/RediSearchTests/ObjectWithNullableStrings.cs(16,18): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net7.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/RediSearchTests/ObjectWithNullableStrings.cs(19,18): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net7.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/RediSearchTests/Person.cs(78,22): warning CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context. [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net7.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/RediSearchTests/AggregationFunctionalTests.cs(214,63): warning CS4014: Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net7.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/RediSearchTests/ReducerTests.cs(804,63): warning CS4014: Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net7.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/ConnectionTests.cs(10,24): warning CS0414: The field 'ConnectionTests.SENTINEL_CONNECTION_STRING' is assigned but its value is never used [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net7.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/ConnectionTests.cs(9,24): warning CS0414: The field 'ConnectionTests.STANDALONE_CONNECTION_STRING' is assigned but its value is never used [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net7.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/RediSearchTests/SearchFunctionalTests.cs(1185,21): warning xUnit1013: Public method 'CompareTimestamps' on test class 'SearchFunctionalTests' should be marked as a Theory. (https://xunit.github.io/xunit.analyzers/rules/xUnit1013) [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net7.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/ConfigurationTests.cs(109,13): warning xUnit2012: Do not use Enumerable.Any() to check if a value exists in a collection. (https://xunit.github.io/xunit.analyzers/rules/xUnit2012) [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net7.0]
/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/ConfigurationTests.cs(110,13): warning xUnit2012: Do not use Enumerable.Any() to check if a value exists in a collection. (https://xunit.github.io/xunit.analyzers/rules/xUnit2012) [/private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/Redis.OM.Unit.Tests.csproj::TargetFramework=net7.0]
Redis.OM.Unit.Tests -> /private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/bin/Debug/net7.0/Redis.OM.Unit.Tests.dll
Test run for /private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/bin/Debug/net7.0/Redis.OM.Unit.Tests.dll (.NETCoreApp,Version=v7.0)
Test run for /private/tmp/redis-om-dotnet-issue-536/test/Redis.OM.Unit.Tests/bin/Debug/net6.0/Redis.OM.Unit.Tests.dll (.NETCoreApp,Version=v6.0)
VSTest version 17.13.0 (arm64)
VSTest version 17.13.0 (arm64)

Starting test execution, please wait...
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
A total of 1 test files matched the specified pattern.

Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: 50 ms - Redis.OM.Unit.Tests.dll (net7.0)

Passed! - Failed: 0, Passed: 1, Skipped: 0, Total: 1, Duration: 59 ms - Redis.OM.Unit.Tests.dll (net6.0)\n\nRemaining risk: the issue may depend on a different source expression shape than the current reproduction path; if the original report used a null-conditional or a different nullable form, that should be validated separately.


Note

Low Risk
Low risk: adds a focused unit test only, with no production code changes.

Overview
Adds a regression unit test in SearchTests.cs to lock in the expected FT.SEARCH query serialization for Where(x => x.String2 != null && x.String2.Contains("Fal")) when combined with a Select projection and Take, ensuring the null-guard produces the correct -(ismissing(@String2)) + contains clause and RETURN fields.

Written by Cursor Bugbot for commit 9ad92f6. This will update automatically on new commits. Configure here.

@jit-ci
Copy link

jit-ci bot commented Mar 18, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant