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

Fix: Remove nulls from context before evaluating expressions #1474

Merged
merged 4 commits into from
Oct 3, 2023

Conversation

mapedraza
Copy link
Collaborator

This PR delete null elements from context. This fix arithmetic problems due to JEXL library bug:
#1440
TomFrost/Jexl#133

Overpasses:
#1471

@mapedraza
Copy link
Collaborator Author

From #1471

Conclusions:

  • case b (v*3)
    • For Null values, is always failing (treating Null as 0)
    • For NaN values, it works well, giving Null as response.
  • case f ((v*3)==Null?'soy null':'no soy null') is always failing
  • Using explicitAttrs acts as sending a measurement with null value

This PR solves case b. Case f is still failing.

@mapedraza mapedraza marked this pull request as ready for review September 29, 2023 14:33
@AlvaroVega
Copy link
Member

AlvaroVega commented Oct 3, 2023

Not sure if this approach is introducing a bit of overhead, and maybe just only at measure level approach could be enough #1473
but LGTM

@AlvaroVega AlvaroVega merged commit af08bd8 into master Oct 3, 2023
8 checks passed
@fgalan fgalan deleted the task/fix-null-arithmetic-nulls branch October 3, 2023 15:29
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.

2 participants