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

remap-lang: improve arithmetic type checking and test coverage #5246

Closed
JeanMertz opened this issue Nov 26, 2020 · 0 comments · Fixed by #6353
Closed

remap-lang: improve arithmetic type checking and test coverage #5246

JeanMertz opened this issue Nov 26, 2020 · 0 comments · Fixed by #6353
Assignees
Labels
domain: reliability Anything related to Vector's reliability domain: vrl Anything related to the Vector Remap Language type: enhancement A value-adding code change that enhances its existing functionality.

Comments

@JeanMertz
Copy link
Contributor

In #5059 we've improved type checking of arithmetic operations to be more exact than before. However, as @FungusHumungus notes in #5059 (comment), there is still more we can do to get more precise type information.

For example, "foo" * 3 is valid, and will always return "foofoofoo", but the type definition of this expression resolves to Bytes | Integer | Float, which isn't wrong, but also isn't as accurate as it can be (e.g. Bytes).

Additionally, we need to expand our test coverage of the arithmetic expression logic, as there are still some gaps in its functionality.

For example, while "foo" * 3 works, 3 * "foo" does not.

@JeanMertz JeanMertz added type: enhancement A value-adding code change that enhances its existing functionality. domain: vrl Anything related to the Vector Remap Language labels Nov 26, 2020
@binarylogic binarylogic added this to the 2021-01-04 Xenomass Well milestone Dec 26, 2020
@binarylogic binarylogic added the domain: reliability Anything related to Vector's reliability label Dec 26, 2020
@jamtur01 jamtur01 removed this from the 2021-01-04 Xenomass Well milestone Jan 1, 2021
@binarylogic binarylogic added this to the 2021-01-18 Tabula E-Rasa milestone Jan 15, 2021
@JeanMertz JeanMertz assigned JeanMertz and unassigned StephenWakely Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: reliability Anything related to Vector's reliability domain: vrl Anything related to the Vector Remap Language type: enhancement A value-adding code change that enhances its existing functionality.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants