diff --git a/src/libraries/Microsoft.PowerFx.Core/Functions/TexlFunction.cs b/src/libraries/Microsoft.PowerFx.Core/Functions/TexlFunction.cs index 5778346a41..9abf51f816 100644 --- a/src/libraries/Microsoft.PowerFx.Core/Functions/TexlFunction.cs +++ b/src/libraries/Microsoft.PowerFx.Core/Functions/TexlFunction.cs @@ -1167,7 +1167,7 @@ private bool SetErrorForMismatchedColumnsCore(DType expectedType, DType actualTy } // Second, set column missing message if applicable - if (RequireAllParamColumns && !expectedType.AreFieldsOptional) + if ((RequireAllParamColumns || features.PowerFxV1CompatibilityRules) && !expectedType.AreFieldsOptional) { errors.EnsureError( DocumentErrorSeverity.Severe, diff --git a/src/libraries/Microsoft.PowerFx.Core/Texl/Remove.cs b/src/libraries/Microsoft.PowerFx.Core/Texl/Remove.cs index eb956e035d..f8e57f83cf 100644 --- a/src/libraries/Microsoft.PowerFx.Core/Texl/Remove.cs +++ b/src/libraries/Microsoft.PowerFx.Core/Texl/Remove.cs @@ -43,9 +43,6 @@ internal class RemoveFunction : BuiltinFunction, ISuggestionAwareFunction public override bool MutatesArg(int argIndex, TexlNode arg) => argIndex == 0; - // !!!TODO this might be a problem. - public override bool RequireAllParamColumns => true; - public override bool ArgMatchesDatasourceType(int argNum) { return argNum >= 1; @@ -348,8 +345,6 @@ internal class RemoveAllFunction : BuiltinFunction public override bool MutatesArg(int argIndex, TexlNode arg) => argIndex == 0; - public override bool RequireAllParamColumns => true; - public override bool ArgMatchesDatasourceType(int argNum) { return argNum == 1; diff --git a/src/tests/Microsoft.PowerFx.Interpreter.Tests.Shared/PADIntegrationTests.cs b/src/tests/Microsoft.PowerFx.Interpreter.Tests.Shared/PADIntegrationTests.cs index af0f8cef78..1dd46080a3 100644 --- a/src/tests/Microsoft.PowerFx.Interpreter.Tests.Shared/PADIntegrationTests.cs +++ b/src/tests/Microsoft.PowerFx.Interpreter.Tests.Shared/PADIntegrationTests.cs @@ -167,7 +167,6 @@ public void DataTableEvalTest2() var check = engine.Check("Remove(robintable, {Scores:10}, RemoveFlags.All)", options: opt); Assert.False(check.IsSuccess); - Assert.Contains("ErrColumnMissing_ColName_ExpectedType", check.Errors.Select(err => err.MessageKey)); Assert.Equal(3, table.Rows.Count); }