From 891ef5facfad143581de6258bf68cc75fbe40430 Mon Sep 17 00:00:00 2001 From: Christopher Homberger Date: Sun, 1 Dec 2024 16:35:48 +0100 Subject: [PATCH] Remove support for objects in ado Coalesce --- .../Expressions2/Sdk/Functions/v1/Coalesce.cs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/Sdk/DTExpressions2/Expressions2/Sdk/Functions/v1/Coalesce.cs b/src/Sdk/DTExpressions2/Expressions2/Sdk/Functions/v1/Coalesce.cs index 3711bda8b44..c38e78dbc16 100644 --- a/src/Sdk/DTExpressions2/Expressions2/Sdk/Functions/v1/Coalesce.cs +++ b/src/Sdk/DTExpressions2/Expressions2/Sdk/Functions/v1/Coalesce.cs @@ -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; } } }