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

Define order of operations in derivation expressions #721

Open
tokoko opened this issue Oct 5, 2024 · 0 comments
Open

Define order of operations in derivation expressions #721

tokoko opened this issue Oct 5, 2024 · 0 comments

Comments

@tokoko
Copy link
Contributor

tokoko commented Oct 5, 2024

This is a continuation of a discussion from slack. Extensions function return type expressions allow expressing types with math operators as defined in the spec, but the following points aren't clear:

  • Are parenthesis allowed? - spec doesn't say one way or the other but antlr grammar in substrait-java seems to assume they are.
  • Should evaluation follow the usual order of operations (pemdas)? - once again, spec is unclear, while antlr grammar doesn't follow pemdas, or to be exact it treats parenthesis with the highest precedence, but doesn't differentiate between multiplication/division and addition/subtraction.

I think we should both allow parenthesis and follow pemdas as that is what's most intuitive in the context. One way or the other, this should be made clear in the spec.

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