InseeFr / Trevas

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

var_samp #324

Closed NicoLaval closed 1 month ago

NicoLaval commented 1 month ago

@noahboerger you reported var_samp is not supported.

I thought it was, for scalars, components and datasets.

Could you report a failed example please?

noahboerger commented 1 month ago

The example i have tested is from the BdI testcases the one under "aggregate/var_samp".

The following statement has been failing: result:= var_samp(ds1 group by Id_2);

Occured error ### Exception ``` fr.insee.vtl.engine.exceptions.UnimplementedException: the function var_samp is not yet implemented at fr.insee.vtl.engine.visitors.expression.ExpressionVisitor.visitFunctionsExpression(ExpressionVisitor.java:495) at fr.insee.vtl.engine.visitors.expression.ExpressionVisitor.visitFunctionsExpression(ExpressionVisitor.java:41) at fr.insee.vtl.parser.VtlParser$FunctionsExpressionContext.accept(VtlParser.java:629) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) at fr.insee.vtl.engine.visitors.AssignmentVisitor.visitAssignment(AssignmentVisitor.java:51) at fr.insee.vtl.engine.visitors.AssignmentVisitor.visitTemporaryAssignment(AssignmentVisitor.java:59) at fr.insee.vtl.parser.VtlParser$TemporaryAssignmentContext.accept(VtlParser.java:372) at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) at fr.insee.vtl.engine.VtlScriptEngine.evalStream(VtlScriptEngine.java:263) at fr.insee.vtl.engine.VtlScriptEngine.eval(VtlScriptEngine.java:282) at java.scripting/javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:262) at fr.insee.trevas.jupyter.VtlKernel.eval(VtlKernel.java:305) at io.github.spencerpark.jupyter.kernel.BaseKernel.handleExecuteRequest(BaseKernel.java:334) at io.github.spencerpark.jupyter.channels.ShellChannel.lambda$bind$0(ShellChannel.java:64) at io.github.spencerpark.jupyter.channels.Loop.lambda$new$0(Loop.java:21) at io.github.spencerpark.jupyter.channels.Loop.run(Loop.java:78) ```
NicoLaval commented 1 month ago

Noticed. It's related to #329