microsoft / microsoft/Power-Fx
Coalescing to zero in arg preprocessor inconsistent between Float and Decimal
Open
@nguhoa is already working on this.
Since Jun 28, 2023.
- Dominant language
- C#
- Stars
- 3.4k
- Forks
- 358
- Avg merge
- 10h 34m
- Merged PRs (30d)
- 3
Description
Why are these different? Both with and without NIF, dealing with null argument should be happening. Is there an optimization happening in NIF that isn't happening for Decimal?
> Option( Options.NumberIsFloat, false )
false
> IR(DateTime(1,1,2,1,1,1))
DateTime:d(Coalesce:n(Float:n(1:w), 0:n), Coalesce:n(Float:n(1:w), 0:n), Coalesce:n(Float:n(2:w), 0:n), Coalesce:n(Float:n(1:w), 0:n), Coalesce:n(Float:n(1:w), 0:n), Coalesce:n(Float:n(1:w), 0:n))
> Option( Options.NumberIsFloat, true )
true
> IR(DateTime(1,1,2,1,1,1))
DateTime:d(1:n, 1:n, 2:n, 1:n, 1:n, 1:n)
> IR(DateTime(1,1,2,Blank(),1,1))
DateTime:d(1:n, 1:n, 2:n, Coalesce:n(Blank:N(), 0:n), 1:n, 1:n)
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.
Assessment
This issue has not been assessed yet.