Skip to content

Commit 0dc23a6

Browse files
committed
Implement DAG and reordering of the VTL statements
2 parents 8fbc537 + 8b37949 commit 0dc23a6

File tree

96 files changed

+3477
-1280
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+3477
-1280
lines changed

coverage/pom.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
<parent>
77
<groupId>fr.insee.trevas</groupId>
88
<artifactId>trevas-parent</artifactId>
9-
<version>1.12.0</version>
9+
<version>2.0.0</version>
1010
</parent>
1111

1212
<artifactId>coverage</artifactId>
1313
<description>Aggregate Coverage Report</description>
1414
<name>VTL coverage</name>
15-
<version>1.12.0</version>
15+
<version>2.0.0</version>
1616

1717
<properties>
1818
<sonar.coverage.jacoco.xmlReportPaths>
@@ -24,37 +24,37 @@
2424
<dependency>
2525
<groupId>fr.insee.trevas</groupId>
2626
<artifactId>vtl-engine</artifactId>
27-
<version>1.12.0</version>
27+
<version>2.0.0</version>
2828
</dependency>
2929
<dependency>
3030
<groupId>fr.insee.trevas</groupId>
3131
<artifactId>vtl-jackson</artifactId>
32-
<version>1.12.0</version>
32+
<version>2.0.0</version>
3333
</dependency>
3434
<dependency>
3535
<groupId>fr.insee.trevas</groupId>
3636
<artifactId>vtl-jdbc</artifactId>
37-
<version>1.12.0</version>
37+
<version>2.0.0</version>
3838
</dependency>
3939
<dependency>
4040
<groupId>fr.insee.trevas</groupId>
4141
<artifactId>vtl-model</artifactId>
42-
<version>1.12.0</version>
42+
<version>2.0.0</version>
4343
</dependency>
4444
<dependency>
4545
<groupId>fr.insee.trevas</groupId>
4646
<artifactId>vtl-parser</artifactId>
47-
<version>1.12.0</version>
47+
<version>2.0.0</version>
4848
</dependency>
4949
<dependency>
5050
<groupId>fr.insee.trevas</groupId>
5151
<artifactId>vtl-spark</artifactId>
52-
<version>1.12.0</version>
52+
<version>2.0.0</version>
5353
</dependency>
5454
<dependency>
5555
<groupId>fr.insee.trevas</groupId>
5656
<artifactId>vtl-csv</artifactId>
57-
<version>1.12.0</version>
57+
<version>2.0.0</version>
5858
</dependency>
5959
<dependency>
6060
<groupId>com.fasterxml.jackson.core</groupId>

docs/blog/2025-09-28-trevas-2.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
slug: /trevas-2
3+
title: Trevas - Version 2.0.0
4+
authors: [nicolas]
5+
tags: [Trevas]
6+
---
7+
8+
import useBaseUrl from '@docusaurus/useBaseUrl';
9+
import Link from '@theme/Link';
10+
11+
Trevas 2.0.0 is released!
12+
13+
Following the implementation of DAGs and the reordering of VTL instructions before execution, evaluating a VTL script will integrate this new functionality by default.
14+
15+
A <Link label={'technical documentation'} href={useBaseUrl('/developer-guide/dag')}/> is available to describe this feature and how to disable it.

docs/docs/developer-guide/basic-mode/data-sources/jdbc.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ custom_edit_url: null
1212
<dependency>
1313
<groupId>fr.insee.trevas</groupId>
1414
<artifactId>vtl-jdbc</artifactId>
15-
<version>1.12.0</version>
15+
<version>2.0.0</version>
1616
</dependency>
1717
```
1818

docs/docs/developer-guide/basic-mode/data-sources/json.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ custom_edit_url: null
1212
<dependency>
1313
<groupId>fr.insee.trevas</groupId>
1414
<artifactId>vtl-jackson</artifactId>
15-
<version>1.12.0</version>
15+
<version>2.0.0</version>
1616
</dependency>
1717
```
1818

docs/docs/developer-guide/dag.mdx

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
id: dag
3+
title: DAG (Directed acyclic graph) - Statement reordering
4+
sidebar_label: DAG - Statement reordering
5+
slug: /developer-guide/dag
6+
custom_edit_url: null
7+
---
8+
9+
### Statement reordering
10+
11+
Suppose we have two Transformations:
12+
13+
1. Create an intermediate dataset `DS_np`
14+
2. Use `DS_np` to calculate another dataset `DS_p`
15+
16+
Even if we write them in "reverse" order, the VTL standard requires executing them in the correct dependency order.
17+
18+
```
19+
-- Transformation Scheme Example
20+
21+
-- (i) This depends on DS_np
22+
DS_p <- if DS_np >= 0 then DS_np else DS_1;
23+
24+
-- (ii) This produces DS_np
25+
DS_np := (DS_1 - DS_2) * 2;
26+
```
27+
28+
Execution Order (resolved by the engine)
29+
30+
1. (ii) must run first because DS_np is required before evaluating (i).
31+
32+
2. (i) runs afterwards, since it consumes DS_np.
33+
34+
So even though we wrote (i) before (ii), the engine reorders them automatically, **when reordering is activated**.
35+
36+
### Activate reordering
37+
38+
The current behavior of Trevas is that statement reordering is **activated per default**, as this is the behavior required by the VTL standard.
39+
Statement reordering can be **deactivated** via the following config flag ("$vtl.engine.use_dag")
40+
41+
```java
42+
ScriptEngine engine = new ScriptEngineManager().getEngineByName("vtl");
43+
engine.put("$vtl.engine.use_dag", "false");
44+
```

docs/docs/developer-guide/index-developer-guide.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import Card from '@theme/Card';
1515
<dependency>
1616
<groupId>fr.insee.trevas</groupId>
1717
<artifactId>vtl-engine</artifactId>
18-
<version>1.12.0</version>
18+
<version>2.0.0</version>
1919
</dependency>
2020
```
2121

docs/docs/developer-guide/provenance.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ custom_edit_url: null
1212
<dependency>
1313
<groupId>fr.insee.trevas</groupId>
1414
<artifactId>vtl-spark</artifactId>
15-
<version>1.12.0</version>
15+
<version>2.0.0</version>
1616
</dependency>
1717
```
1818

docs/docs/developer-guide/spark-mode/index-spark-mode.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The `SparkDataset` data sets can represent statistical tables in a Java applicat
1616
<dependency>
1717
<groupId>fr.insee.trevas</groupId>
1818
<artifactId>vtl-spark</artifactId>
19-
<version>1.12.0</version>
19+
<version>2.0.0</version>
2020
</dependency>
2121
```
2222

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
id: 2.x.x
3+
title: Release 2.x.x
4+
sidebar_label: v2.x.x
5+
slug: /releases/2.x.x
6+
custom_edit_url: null
7+
---
8+
9+
## Version 2.0.0 - 09/28/25
10+
11+
(See technical release on [Github](https://github.com/InseeFr/Trevas/releases/tag/v2.0.0))
12+
13+
- Implementation of a DAG and reordering the VTL statements before execution
14+
- Fix `vtl-prov` and `vtl-sdmx` issues
15+
- Fix comparison issue
16+
- Fix bindings initialization to avoid variable reuse

docs/docs/introduction/releases/index-releases.mdx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,12 @@ import Card from '@theme/Card';
1919
page={useBaseUrl('/releases/1.x.x')}
2020
/>
2121
</div>
22+
<div className="col">
23+
<Card
24+
title="v2.x.x"
25+
description=""
26+
page={useBaseUrl('/releases/2.x.x')}
27+
/>
28+
</div>
2229
</div>
2330
</div>

0 commit comments

Comments
 (0)