-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix delegation check on UDF for datasource type (#2816)
## Probelm UDF with direct assigned datasource type such as `UDF1():Accounts = Accounts` is always calculated as non-delegable. There is no issue for `UDF2():Accounts = Filter(Account, ...)` since it would go through override validation in Filter class, where check data source metadata directly. UDF gets IsDelegatable from Top which is Filter(). ## Option 1 (current) Handle in overridden `IsServerDelegatable` of UserDefinedFunction. It will go check data source metadata directly if it's FirstNameNode and which haven't been processed. Also, unify the validation to use `IsDelegatable `. ## Option 2 The delegable check on FirstNameNode during binding validates the data is type of `IExternalDelegatableSymbol `, but from this scenario, `IExternalCdsDataSource` is not implanted this interface. So always returns IsServerDelegatable false. I decided to add the implantation to align with `IsPagable`. https://github.com/microsoft/Power-Fx/blob/0fa19687742caa771c4a8f0716f07005497bec49/src/libraries/Microsoft.PowerFx.Core/Binding/Binder.cs#L688C13-L688C75 https://dev.azure.com/msazure/OneAgile/_workitems/edit/29998102
- Loading branch information
1 parent
25082cf
commit 7b59ddc
Showing
3 changed files
with
66 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters