diff --git a/src/libraries/Microsoft.PowerFx.Core/Entities/External/TableDelegationInfo.cs b/src/libraries/Microsoft.PowerFx.Core/Entities/External/TableDelegationInfo.cs index 269b0b3509..08ee5073d5 100644 --- a/src/libraries/Microsoft.PowerFx.Core/Entities/External/TableDelegationInfo.cs +++ b/src/libraries/Microsoft.PowerFx.Core/Entities/External/TableDelegationInfo.cs @@ -23,6 +23,9 @@ public abstract class TableDelegationInfo // Used to indicate whether this table has selectable columns public SelectionRestrictions SelectionRestriction { get; init; } + [Obsolete("preview")] + public SummarizeCapabilities SummarizeCapabilities { get; init; } + // Defines ungroupable columns public GroupRestrictions GroupRestriction { get; init; } @@ -266,6 +269,35 @@ public SelectionRestrictions() } } + [Obsolete("preview")] + public class SummarizeCapabilities + { + public virtual bool IsSummarizableProperty(string propertyName) + { + return false; + } + + public virtual bool IsSummarizableMethod(SummarizeMethod method) + { + return false; + } + + public SummarizeCapabilities() + { + } + } + + [Obsolete("preview")] + public enum SummarizeMethod + { + None, + Sum, + Average, + Min, + Max, + Count, + } + public sealed class FilterRestrictions { // List of required properties diff --git a/src/libraries/Microsoft.PowerFx.Core/Public/Values/DelegationParameters.cs b/src/libraries/Microsoft.PowerFx.Core/Public/Values/DelegationParameters.cs index 9e3c9db056..f606401c19 100644 --- a/src/libraries/Microsoft.PowerFx.Core/Public/Values/DelegationParameters.cs +++ b/src/libraries/Microsoft.PowerFx.Core/Public/Values/DelegationParameters.cs @@ -73,6 +73,9 @@ public enum DelegationParameterFeatures // $apply Apply = 1 << 4, + // $apply = groupby((field1, ..), field with sum as TotalSum) + ApplyGroupBy = 1 << 5, + /* To be implemented later when needed diff --git a/src/tests/Microsoft.PowerFx.Core.Tests.Shared/PublicSurfaceTests.cs b/src/tests/Microsoft.PowerFx.Core.Tests.Shared/PublicSurfaceTests.cs index 6a9a8368f3..352871be4b 100644 --- a/src/tests/Microsoft.PowerFx.Core.Tests.Shared/PublicSurfaceTests.cs +++ b/src/tests/Microsoft.PowerFx.Core.Tests.Shared/PublicSurfaceTests.cs @@ -202,6 +202,8 @@ public void PublicSurface_Tests() "Microsoft.PowerFx.Core.Entities.IRefreshable", "Microsoft.PowerFx.Core.Entities.SelectionRestrictions", "Microsoft.PowerFx.Core.Entities.SortRestrictions", + "Microsoft.PowerFx.Core.Entities.SummarizeCapabilities", + "Microsoft.PowerFx.Core.Entities.SummarizeMethod", "Microsoft.PowerFx.Core.Entities.TableDelegationInfo", "Microsoft.PowerFx.Core.Functions.Delegation.DelegationOperator", "Microsoft.PowerFx.Core.Localization.ErrorResourceKey",