microsoft / microsoft/Power-Fx
Type Coercion helper to provide Coercion Function given a type
Open
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 3.4k
- Forks
- 358
- Avg merge
- 10h 34m
- Merged PRs (30d)
- 3
Description
Have a helper that provides the appropriate coercion function for each type.
Ie, avoid people having to write this:
// Coercion()
if (fieldType == FormulaType.String)
{
// No coercion needed
} else if (fieldType == FormulaType.Number)
{
sb.Append("Value");
}
else if (fieldType == FormulaType.Guid)
{
sb.Append("GUID");
}
else if (fieldType == FormulaType.DateTime)
{
sb.Append("DateTimeValue");
}
else if (fieldType == FormulaType.Date)
{
sb.Append("DateValue");
}
else if (fieldType == FormulaType.Boolean)
{
sb.Append("Boolean");
}
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
No files or tests are named. Start by locating the existing FormulaType coercion branches and the FormulaType definitions, then determine where a shared helper belongs. Done means the helper provides the appropriate coercion behavior for String, Number, Guid, DateTime, Date, and Boolean without repeated type-condition logic.
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
- 38/100