microsoft / microsoft/Power-Fx

Mutation check semantics should differentiate between create/update

Open
#2,249 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
3.4k
Forks
358
Avg merge
10h 34m
Merged PRs (30d)
3

Description

Today both Collect and Patch functions call the same check semantics logic:
https://github.com/microsoft/Power-Fx/blob/7287db1051e7a77b5b068d90016a2570a237e520/src/libraries/Microsoft.PowerFx.Interpreter/Functions/Mutation/MutationUtils.cs#L16

Data sources don't know when PFx is trying to create or update a record. We might need to change the interface signature:
https://github.com/microsoft/Power-Fx/blob/7287db1051e7a77b5b068d90016a2570a237e520/src/libraries/Microsoft.PowerFx.Interpreter/Functions/Mutation/MutationUtils.cs#L16

For DV data source, we could leverage the use of ds.IsInvalidForCreate and ds.IsInvalidForUpdate properties.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/libraries/Microsoft.PowerFx.Interpreter/Functions/Mutation/MutationUtils.cs at the shared check-semantics logic used by Collect and Patch. Trace the interface and the DV data-source properties IsInvalidForCreate and IsInvalidForUpdate; the work is done when create and update operations can apply their corresponding semantics without conflating them.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.