InseeFr / Trevas

Transformation engine and validator for statistics.
MIT License
10 stars 5 forks source link

Analytic operators #294

Closed hadrienk closed 8 months ago

hadrienk commented 9 months ago

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 commented 9 months ago

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

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'
NicoLaval commented 9 months ago

@pengfei99 I think you forgot preceding or following keyword

NicoLaval commented 9 months ago
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)

sonarcloud[bot] commented 8 months ago

Quality Gate Failed Quality Gate failed

Failed conditions

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

See analysis details on SonarCloud

FranckCo commented 8 months ago

See issue #300 for quality gate failing reason.