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

Allow more than 20 And operatrors. #2852

Open
MikeStall opened this issue Feb 18, 2025 · 3 comments
Open

Allow more than 20 And operatrors. #2852

MikeStall opened this issue Feb 18, 2025 · 3 comments
Assignees

Comments

@MikeStall
Copy link
Contributor

This should succeed.

true && true && true && true && true &&
true && true && true && true && true && 
true && true && true && true && true &&
true && true && true && true && true &&
true && true && true && true && true &&
true && true && true && true && true &&
true && true && true && true && true &&
true && true && true && true && true

It's hitting protections for max nesting depth: Message:"Max call depth exceeded.

Note that arranging in flat form works:

And(
    true,true,true,true,true,
    true,true,true,true,true,
    true,true,true,true,true,
    true,true,true,true,true,
    true,true,true,true,true,
    true,true,true,true,true,
    true,true,true,true,true,
    true,true,true,true,true)
@anderson-joyle
Copy link
Contributor

Can't hosts simply

new PowerFxConfig(...)
{
    MaxCallDepth = NEW_MAX_NUMBER
}

@MikeStall
Copy link
Contributor Author

The problem is that fundamentally, a && b && c shouldn't threaten a stack overflow.

@anderson-joyle anderson-joyle self-assigned this Feb 19, 2025
@jas-valgotar
Copy link
Contributor

This may help:

private static IntermediateNode ConcatenateArgs(IntermediateNode arg1, IntermediateNode arg2, IRContext irContext)

I think similar optimization may help for all the operator that we convert to call node.

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

3 participants