Skip to content

Commit

Permalink
Remove support for objects in ado Coalesce (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherHX authored Dec 1, 2024
1 parent d9d1e41 commit d07ae4d
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/Sdk/DTExpressions2/Expressions2/Sdk/Functions/v1/Coalesce.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,18 @@ internal sealed class Coalesce : Function
protected sealed override Object EvaluateCore(EvaluationContext context, out ResultMemory memory)
{
memory = null;
EvaluationResult result = null;
string result = null;
foreach (ExpressionNode parameter in Parameters)
{
result = parameter.Evaluate(context);
if (result.Kind == ValueKind.Null)
result = parameter.EvaluateString(context);
if (String.IsNullOrEmpty(result))
{
continue;
}

if (result.Kind == ValueKind.String && String.IsNullOrEmpty(result.Value as String))
{
continue;
}

break;
}

return result?.Value;
return result;
}
}
}

0 comments on commit d07ae4d

Please sign in to comment.