Skip to content

Commit

Permalink
Apply fix from dotnet#34729 to Cosmos SqlExpressionFactory to keep it…
Browse files Browse the repository at this point in the history
… in sync
  • Loading branch information
ChrisJollyAU committed Oct 23, 2024
1 parent 931a67c commit 95167e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/EFCore.Cosmos/Query/Internal/SqlExpressionFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ private SqlExpression ApplyTypeMappingOnSqlBinary(
case ExpressionType.Coalesce:
{
inferredTypeMapping = typeMapping ?? ExpressionExtensions.InferTypeMapping(left, right);
resultType = inferredTypeMapping?.ClrType ?? left.Type;
resultType = inferredTypeMapping?.ClrType ?? (left.Type != typeof(object) ? left.Type : right.Type);
resultTypeMapping = inferredTypeMapping;
break;
}
Expand Down

0 comments on commit 95167e3

Please sign in to comment.