microsoft / microsoft/Power-Fx
Coercion from number and Boolean/Text backed option sets is not consistent
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.4k
- Forks
- 358
- Avg merge
- 10h 34m
- Merged PRs (30d)
- 3
Description
Boolean and Text are supported, but not numbers. We should consider expanding this. Dataverse allows the setting of these numbers and it may be useful for range comparisons, among other uses.
Likely involve changes similar to line 351 of BinderUtils.cs in CheckTypeCore where there is an exception for Boolean, and line 1267 of BinderUtils.cs in CheckBinaryOpCore for the And/Or operators where OptionSet is listed as a valid data type.
Tests in RecalcEngineTests.cs will also need an update.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/libraries/Microsoft.PowerFx.Core/Binding/BinderUtils.cs, reviewing the CheckTypeCore area around line 351 and CheckBinaryOpCore around line 1267. Then inspect the related cases in RecalcEngineTests.cs. Done means numeric coercion for option sets is handled consistently with the existing Boolean and Text cases and the relevant tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100