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

Analytic operators #294

Merged
merged 38 commits into from
Jan 17, 2024
Merged

Analytic operators #294

merged 38 commits into from
Jan 17, 2024

Conversation

hadrienk
Copy link
Collaborator

We reworked the analytic engine to support operations on datasets.

@pengfei99 I see a bunch of tests failing because of syntax/incorrect assertions. Could you take a pass and correct what you see is an easy fix?

All the tests are in fr.insee.vtl.spark.processing.engine.analytic

@pengfei99
Copy link
Contributor

@hadrienk I think the problems are not just the simple incorrect assertions. I noticed two types of errors

  • sytanx errors: I think all the unit tests which contains range between are failed. Is there an update on VTL grammar?

For example, the below VTL syntax is no longer valid

res := stddev_samp ( ds1 over ( partition by Id_1 order by Year range between -1 and 1) );

The unit test output:

fr.insee.vtl.model.exceptions.VtlScriptException: no viable alternative at input '-1 and'
  • Precisions on decimal number: I commit a fix which only changes the assert case, but I think the better solution is to write another assert function which can round all the decimal numbers of the actual dataset then compare with the expected dataset

@NicoLaval
Copy link
Collaborator

@pengfei99 I think you forgot preceding or following keyword

@NicoLaval
Copy link
Collaborator

res := stddev_samp ( ds1 over ( partition by Id_1 order by Year range between -1 preceding and 1 following) );

Is VTL valid (you can validate your expressions here)

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions

19.5% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@FranckCo
Copy link
Collaborator

See issue #300 for quality gate failing reason.

@FranckCo FranckCo merged commit e826c14 into develop Jan 17, 2024
2 of 3 checks passed
@FranckCo FranckCo deleted the feature/analytics branch January 17, 2024 16:25
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.

4 participants