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

Adds arithmetic operators as separate nodes & fixes casts #1522

Closed
wants to merge 2 commits into from

Conversation

johnedquinn
Copy link
Member

@johnedquinn johnedquinn commented Jul 24, 2024

Description

  • Adds arithmetic operators as separate nodes. This allows for us to type the arithmetic operators how we please. I followed SQL Server's rules for typing.
  • Fixes casts to invalid types for conformance. The conformance tests allow them to pass -- so I made them warnings instead of errors.
  • Fixes function resolution (static) for dynamic arguments.
    • Previously, 1 > some_dynamic_value would result in Fn.Gt(INT, INT) -> BOOL. While this had the most number of static exact matches, it didn't necessarily have the most number of runtime exact matches -- causing behavior that would break the gradual guarantee. Fixed this by checking whether any argument is dynamic.
  • Simplifies dynamic dispatch (runtime) by following the same rules as function resolution.

Other Information

  • Updated Unreleased Section in CHANGELOG: NO
  • Any backward-incompatible changes? YES
    • Added nodes specifically for the arithmetic operators.
  • Any new external dependencies? NO
  • Do your changes comply with the Contributing Guidelines
    and Code Style Guidelines? YES

License Information

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Fixes casts to invalid types for conformance
@johnedquinn johnedquinn marked this pull request as draft August 1, 2024 17:22
@johnedquinn
Copy link
Member Author

Closing in favor of #1533.

@johnedquinn johnedquinn closed this Aug 6, 2024
@johnedquinn johnedquinn deleted the v1-conformance-ops branch August 6, 2024 16:57
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

Successfully merging this pull request may close these issues.

1 participant