* Implement proper function and add unit tests
* Edit unit test to be lowercase
* Add non ascii unit test. Edit method signature and use EvalRunner for CultureInfo
* Acronyms shouldn't be capital after proper func, add more tests
* Fix#378
If(true, OptionSet.Option1)
OptionSetValue should derive from ValidFormulaValue, not FormulaValue
* Pr feedback
Co-authored-by: Mike Stall <jmstall@microsoft.com>
* Count and CountA implementations
* Count and CountA error handling. Moving Count* functions tests to specific files.
* Handling rows with null values.
* Changing row validation
* Test case return type changed. Sorting count functions alphabetically.
* Sorting count functions alphabetically.
* Test case return type changed.
* Added new test files for the PowerFx functions
This commit consists of the text test files for the following functions:
If/Switch
And/Or/Not
Blank/IsBlank
* Updated If.txt file with review comments
Make more things public.
Introduce a FunctionInfo to wrap a TexlFunction (similar to how FormulaType wraps DType). Only exposes limited information - will followup on what to do about types.
Allow custom functions to be overloaded.
Turns out the conflict was unnecessary - using a Dict with a name key when a HashSet was sufficient.
This relies that TexlFunctions have object reference equality and we don't add the same function instance multiple times. .
Enable EnableExpressionChaining in PowerFx Engine
* Implement EvalVisitor for ChainingNode
* Code cleanup
* Add support for parser flags to #SETUP handler
Enable public hosts to derive from RecordValue.
RecordValue doesn't need an IRContext (which is private), just a Type.
* Make RecordValue.TryGetField abstract. Else we had a circular reference between Fields and TryGetField.
add more tests.
Remove InMemoryRecordValue.PropagateFieldType. This was injecting deep copies of RecordValues into the expressions, and that would implicitly convert derived RecordValues into
InMemoryRecordValue. Also move into the base class so that derived classes don't worry about it. InMemoryRecordValue is now a trivial implementation.
* add more runtime validation to ensrue host implements TryGetField() properly.
* started shuffle
* Add unit test
* Use static random & edit unit test
* Edit test case
* Changed checkFunctionCounts to point to another func
* Add more unit test & change method signature.
* Statistical Functions(StdevP, StdevPT, VarP, VarPT) implementation.
Implemented some statistical functions in the interpreter.
* Moved tests into new files and improved error handling for VarP and StdevP
* Used FiniteChecker for error-handing in VarP and StdevP functions
* Add the FormulaSet class
* Update public surface tests
* Add basic unit test
* Add IDependencyFinder
* Update public surface tests again
* Add support for cycles and results in topological sort
* Mark FormulaSet as sealed
* Make FormulaSet internal
* Expose ParseResult.
This was a bit non-trivial because:
1. Use existing ParseResult class rather than create a new one. The existing FormulaClass doesn't have the right surface and is kept internal. PAClient uses FormulaClass, not ParseResult.
2. Have consistency between CheckResult and ParseResult, particularly around error handling
3. consistent semantics of null vs empty enumerables.
4. Consistent error vs. warning settings - creating a default ErrorObject leaves the severity enum empty which defaults to warnings.
5. Needed to allow ParserOptions.
6. added some xml comments
7. There are multiple error objects. (public vs. internal) and need to expose public ones for ParseResult, but keep internal accessible for unit tests.
Add some tests.
* PR feedback
Many of these don't pass yet, so putting in a "NotYetReady" directory and we'll migrate to ExpressionTestCase dir as we verify they pass.
Add unit test to verify they at least all parse, and fix some parser issues.
Tests written by @mitugm14.
* DeleteFormula implementation
Adding the ability to delete formulas from the formulas dict.
* DeleteFormulas test cases
* Delete dependencies
* Extra tests
All our resources were compiled into PowerFx.Core prevously. This splits them out into satellite assemblies, and uses ResourceManager to load the appropriate resource assembly on demand. See https://docs.microsoft.com/en-us/dotnet/api/system.resources.resourcemanager for more details
Before:
8984 KB
After:
785 KB