Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Scalar Table Functions via IR transforms #874

Open
MikeStall opened this issue Dec 2, 2022 · 0 comments
Open

Support Scalar Table Functions via IR transforms #874

MikeStall opened this issue Dec 2, 2022 · 0 comments

Comments

@MikeStall
Copy link
Contributor

Interpreter doesn't support Trig Table Functions today

For 1-argument scalars, we could enable these via an IR transform:
Cos([1,2,3]) // Table overload

Could be rewritten in IR as:
ForAll([1,2,3], Cos(Value)) // ForAll around scalar overload

This can be immediately applied to enabling in interpreter:
https://github.com/microsoft/Power-Fx/blob/main/src/tests/Microsoft.PowerFx.Core.Tests/ExpressionTestCases/TrigTableFunctions.txt

Other table overloads are more complex and can be dealt with later.

Tabular As Scalar Notes
Cos(table) ForAll(table, Cos(Value)) Trivial
Round(table, arg1) ForAll(table, Round(Value, arg1)) 1 arg
Round(table0, table1) ??? 2 tables, complex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant