diff --git a/vtl-bundles/vtl-coverage/src/test/java/it/bancaditalia/oss/vtl/coverage/tests/IntegrationTestSuite.java b/vtl-bundles/vtl-coverage/src/test/java/it/bancaditalia/oss/vtl/coverage/tests/IntegrationTestSuite.java index 3c0af9d9a..421974f68 100644 --- a/vtl-bundles/vtl-coverage/src/test/java/it/bancaditalia/oss/vtl/coverage/tests/IntegrationTestSuite.java +++ b/vtl-bundles/vtl-coverage/src/test/java/it/bancaditalia/oss/vtl/coverage/tests/IntegrationTestSuite.java @@ -40,6 +40,8 @@ import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import java.util.stream.Stream; import org.hamcrest.Matchers; @@ -59,65 +61,91 @@ public class IntegrationTestSuite { - static { - System.setProperty("vtl.sequential", "true"); + private static final Path TEST_ROOT; + + static + { + try + { + TEST_ROOT = Paths.get(IntegrationTestSuite.class.getResource("../tests").toURI()); + } + catch (URISyntaxException e) + { + throw new ExceptionInInitializerError(e); + } } - - private static Path root; public static Stream test() throws IOException, URISyntaxException { - root = Paths.get(IntegrationTestSuite.class.getResource("../tests").toURI()); - METADATA_REPOSITORY.setValue(JsonMetadataRepository.class); List tests = new ArrayList<>(); - String testName; + String category = null; + String operator = null; + String test = null; StringBuilder testCode = new StringBuilder(); try (BufferedReader dirReader = new BufferedReader(new InputStreamReader(IntegrationTestSuite.class.getResourceAsStream("../tests"), UTF_8))) { - while ((testName = dirReader.readLine()) != null) - if (!testName.endsWith(".class")) - { - try (BufferedReader testReader = Files.newBufferedReader(root.resolve(testName).resolve(testName + ".vtl"))) + while ((category = dirReader.readLine()) != null) + if (!category.endsWith(".class")) + try (BufferedReader catReader = new BufferedReader(new InputStreamReader(IntegrationTestSuite.class.getResourceAsStream("../tests/" + category), UTF_8))) { - String testLine; - int headerLines = 20; - while ((testLine = testReader.readLine()) != null) - { - if (--headerLines > 0) - continue; - testCode.append(testLine).append(System.lineSeparator()); - } + while ((operator = catReader.readLine()) != null) + try (BufferedReader opReader = new BufferedReader(new InputStreamReader(IntegrationTestSuite.class.getResourceAsStream("../tests/" + category + "/" + operator), UTF_8))) + { + while ((test = opReader.readLine()) != null) + if (test.endsWith(".vtl")) + { + Matcher matcher = Pattern.compile("([0-9])").matcher(test); + matcher.find(); + String number = matcher.group(1); + try (BufferedReader testReader = Files.newBufferedReader(TEST_ROOT.resolve(category).resolve(operator).resolve("ex_" + number + ".vtl"))) + { + String testLine; + int headerLines = 20; + while ((testLine = testReader.readLine()) != null) + { + if (--headerLines > 0) + continue; + testCode.append(testLine).append(System.lineSeparator()); + } + + tests.add(Arguments.of(category, operator, number, testCode.toString())); + testCode.setLength(0); + } + } + } } - tests.add(Arguments.of(testName, testCode.toString())); - testCode.setLength(0); - } + } + catch (Exception e) + { + System.err.println(category + "/" + operator + "/" + test); + throw e; } - return tests.stream(); + return tests.parallelStream(); } - @ParameterizedTest(name = "{0}") + @ParameterizedTest(name = "{1}[{2}]") @MethodSource - public synchronized void test(final String testName, final String testCode) throws IOException, URISyntaxException + public void test(String categ, String operator, String number, String testCode) throws IOException, URISyntaxException { System.out.println("------------------------------------------------------------------------------------------------"); - System.out.println(" " + testName); + System.out.println(" " + operator + "[" + number + "]"); System.out.println("------------------------------------------------------------------------------------------------"); System.out.println(); System.out.println(testCode); System.out.println("------------------------------------------------------------------------------------------------"); ENVIRONMENT_IMPLEMENTATION.setValues(CSVPathEnvironment.class, WorkspaceImpl.class); - VTL_CSV_ENVIRONMENT_SEARCH_PATH.setValues(root.resolve(testName).toString()); - JSON_METADATA_URL.setValue(IntegrationTestSuite.class.getResource(testName + "/" + testName + ".json").toString()); + VTL_CSV_ENVIRONMENT_SEARCH_PATH.setValues(TEST_ROOT.resolve(categ).resolve(operator).toString()); + JSON_METADATA_URL.setValue(IntegrationTestSuite.class.getResource(categ + "/" + operator + "/ex_" + number + ".json").toString()); VTLSession session = ConfigurationManagerFactory.newManager().createSession(testCode); session.compile(); - DataSet expected = session.resolve("expected", DataSet.class); + DataSet expected = session.resolve("ex_" + number, DataSet.class); DataSet result = session.resolve("test_result", DataSet.class); for (DataStructureComponent comp: expected.getMetadata()) @@ -144,26 +172,26 @@ public synchronized void test(final String testName, final String testCode) thro assertThat(dp, anyOf(resDPs.stream().map(Matchers::equalTo).collect(toList()))); } - @ParameterizedTest(name = "{0} - Spark") + @ParameterizedTest(name = "{1}[{2}] - Spark") @MethodSource("test") - public synchronized void testSpark(final String testName, final String testCode) throws IOException, URISyntaxException + public void testSpark(String categ, String operator, String number, String testCode) throws IOException, URISyntaxException { System.out.println("------------------------------------------------------------------------------------------------"); - System.out.println(" SPARK -- " + testName); + System.out.println(" SPARK -- " + operator + "[" + number + "]"); System.out.println("------------------------------------------------------------------------------------------------"); System.out.println(); System.out.println(testCode); System.out.println("------------------------------------------------------------------------------------------------"); ENVIRONMENT_IMPLEMENTATION.setValues(SparkEnvironment.class, WorkspaceImpl.class); - VTL_SPARK_SEARCH_PATH.setValues(root.resolve(testName).toString()); + VTL_SPARK_SEARCH_PATH.setValues(TEST_ROOT.resolve(categ).resolve(operator).toString()); VTL_SPARK_UI_ENABLED.setValue(false); - JSON_METADATA_URL.setValue(IntegrationTestSuite.class.getResource(testName + "/" + testName + "-spark.json").toString()); + JSON_METADATA_URL.setValue(IntegrationTestSuite.class.getResource(categ + "/" + operator + "/ex_" + number + "-spark.json").toString()); VTLSession session = ConfigurationManagerFactory.newManager().createSession(testCode); session.compile(); - DataSet expected = session.resolve("expected", DataSet.class); + DataSet expected = session.resolve("ex_" + number, DataSet.class); DataSet result = session.resolve("test_result", DataSet.class); for (DataStructureComponent comp: expected.getMetadata()) diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/aggregation_to_scalar/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/aggregation_to_scalar/ex_1-spark.json new file mode 100644 index 000000000..8022ec52f --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/aggregation_to_scalar/ex_1-spark.json @@ -0,0 +1,64 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/op_with_calculated_scalar/op_with_calculated_scalar.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/aggregation_to_scalar/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/op_with_calculated_scalar/op_with_calculated_scalar.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/aggregation_to_scalar/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/aggregation_to_scalar/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/aggregation_to_scalar/ex_1.json new file mode 100644 index 000000000..e397745c6 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/aggregation_to_scalar/ex_1.json @@ -0,0 +1,64 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/aggregation_to_scalar/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/aggregation_to_scalar/ex_1.vtl new file mode 100644 index 000000000..17a7e3ed4 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/aggregation_to_scalar/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_1 * sum(in_1); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc/number_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/aggregation_to_scalar/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc/number_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/aggregation_to_scalar/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/ex_1-spark.json new file mode 100644 index 000000000..8022ec52f --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/ex_1-spark.json @@ -0,0 +1,64 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/plus/plus.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/plus/plus.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/ex_1.json new file mode 100644 index 000000000..e397745c6 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/ex_1.json @@ -0,0 +1,64 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/ex_1.vtl new file mode 100644 index 000000000..f1e1d5569 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/ex_1.vtl @@ -0,0 +1,26 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ + define operator add (x dataset { component _ * }, y dataset { component _ * } ) +returns dataset { component _ * } +is + x+y +end operator; + +test_result := add(in_1, in_1); \ No newline at end of file diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/ex_2-spark.json new file mode 100644 index 000000000..eefdb6a26 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/ex_2-spark.json @@ -0,0 +1,102 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "text_1", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator2/self_defined_operator2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator2/self_defined_operator2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/ex_2.json new file mode 100644 index 000000000..8c34b5e73 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/ex_2.json @@ -0,0 +1,102 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "text_1", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/ex_2.vtl new file mode 100644 index 000000000..f34a4c46f --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/ex_2.vtl @@ -0,0 +1,26 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ + define operator concat (x dataset { component _ * }, y dataset { component _ * } ) +returns dataset { component _ * } +is + x ||" - " || y +end operator; + +test_result:= concat(in_2, in_3); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/div/number_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/div/number_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator2/concat_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator2/concat_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator2/concat_test2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator2/concat_test2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/define_operator/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/membership/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/membership/ex_1-spark.json new file mode 100644 index 000000000..d719b5d8f --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/membership/ex_1-spark.json @@ -0,0 +1,104 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "string_var", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "me_1", + "domain": "boolean" + }, + { + "name": "id_2", + "domain": "number" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + }, + { + "name": "string_var", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/membership_1/membership_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/membership/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/membership_1/membership_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/membership/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/membership/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/membership/ex_1.json new file mode 100644 index 000000000..f99dfe7fe --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/membership/ex_1.json @@ -0,0 +1,104 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "string_var", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "me_1", + "domain": "boolean" + }, + { + "name": "id_2", + "domain": "number" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + }, + { + "name": "string_var", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/membership/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/membership/ex_1.vtl new file mode 100644 index 000000000..73f72e70c --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/membership/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= inner_join(in_1#Me_1 as a, in_1#Id_1 as b); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/membership_1/gen_operators_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/membership/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/membership_1/gen_operators_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/membership/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/ex_1-spark.json new file mode 100644 index 000000000..61ff8d295 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/ex_1-spark.json @@ -0,0 +1,100 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "num_2", + "domain": "number" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "me_1", + "domain": "boolean" + }, + { + "name": "id_2", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_1/parentheses_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_1/parentheses_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/ex_1.json new file mode 100644 index 000000000..b5c2a607a --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/ex_1.json @@ -0,0 +1,100 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "num_2", + "domain": "number" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "me_1", + "domain": "boolean" + }, + { + "name": "id_2", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/ex_1.vtl new file mode 100644 index 000000000..ae629024d --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_1[ calc Num_2:= (2 + Num_1) * Num_1]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/ex_2-spark.json new file mode 100644 index 000000000..7039bd806 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/ex_2-spark.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "me_1", + "domain": "boolean" + }, + { + "name": "id_2", + "domain": "integer" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "integer" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_2/parentheses_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_2/parentheses_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/ex_2.json new file mode 100644 index 000000000..927bec6c6 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/ex_2.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "me_1", + "domain": "boolean" + }, + { + "name": "id_2", + "domain": "integer" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "integer" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/ex_2.vtl new file mode 100644 index 000000000..148005189 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= (2 + in_2#num_1) * in_2#num_1; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_1/gen_operators_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_1/gen_operators_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_2/gen_operators_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_2/gen_operators_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/01 General purpose operators/parentheses/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_1-spark.json new file mode 100644 index 000000000..6d7756053 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_1-spark.json @@ -0,0 +1,100 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_3", + "role": "Measure" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "text_3", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "text_2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_1/string_concatenation_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_1/string_concatenation_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_1.json new file mode 100644 index 000000000..8d5d927d5 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_1.json @@ -0,0 +1,100 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_3", + "role": "Measure" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "text_3", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "text_2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_1.vtl new file mode 100644 index 000000000..57d3dc681 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_1[ calc Text_3:= Text_1||", world!"]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_2-spark.json new file mode 100644 index 000000000..3123ade10 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_2-spark.json @@ -0,0 +1,100 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_3", + "role": "Measure" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "text_3", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "text_2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_2/string_concatenation_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_2/string_concatenation_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_2.json new file mode 100644 index 000000000..e622b0d60 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_2.json @@ -0,0 +1,100 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_3", + "role": "Measure" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "text_3", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "text_2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_2.vtl new file mode 100644 index 000000000..d0d1089d5 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_2[calc Text_3 := Text_1 || Text_2]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_3-spark.json new file mode 100644 index 000000000..a1034ace3 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_3-spark.json @@ -0,0 +1,102 @@ +{ + "datasets": [ + { + "name": "in_4", + "source": "spark:csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "spark:csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_4_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "text_1", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_3/string_concatenation_3.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_3/string_concatenation_3.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_3.json new file mode 100644 index 000000000..3920baeee --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_3.json @@ -0,0 +1,102 @@ +{ + "datasets": [ + { + "name": "in_4", + "source": "csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_4_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "text_1", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_3.vtl new file mode 100644 index 000000000..69cad66e3 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/ex_3.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_3||" - " ||in_4; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_1/trim_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_1/trim_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_2/trim_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_2/trim_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_3/concat_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_3/concat_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_3/concat_test2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/in_4.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_3/concat_test2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/concat/in_4.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/ex_1-spark.json new file mode 100644 index 000000000..701561c85 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/ex_1-spark.json @@ -0,0 +1,84 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "integer_var", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "integer_var", + "domain": "integer" + }, + { + "name": "id_3", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_1/pattern_location_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_1/pattern_location_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/ex_1.json new file mode 100644 index 000000000..23d71609b --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/ex_1.json @@ -0,0 +1,84 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "integer_var", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "integer_var", + "domain": "integer" + }, + { + "name": "id_3", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/ex_1.vtl new file mode 100644 index 000000000..b76a5205b --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= instr(in_1,"a",_,3); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/ex_2-spark.json new file mode 100644 index 000000000..857f68688 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/ex_2-spark.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "a_location", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "number" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "a_location", + "domain": "integer" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_2/pattern_location_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_2/pattern_location_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/ex_2.json new file mode 100644 index 000000000..023e4b90d --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/ex_2.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "a_location", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "number" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "a_location", + "domain": "integer" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/ex_2.vtl new file mode 100644 index 000000000..3d5ef1a69 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_2[calc a_location:= instr(Text_1,"a",_,3)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_1/pattern_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_1/pattern_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_2/pattern_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_2/pattern_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/instr/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/ex_1-spark.json new file mode 100644 index 000000000..2df1331a1 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/ex_1-spark.json @@ -0,0 +1,68 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_1/match_characters_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_1/match_characters_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/ex_1.json new file mode 100644 index 000000000..c2d6e4ab9 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/ex_1.json @@ -0,0 +1,68 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/ex_1.vtl new file mode 100644 index 000000000..b946561f6 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= match_characters(in_1, "\b([A-Z]{2})((?![A-Z]{10}\b)[A-Z0-9]{10})\b"); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/ex_2-spark.json new file mode 100644 index 000000000..cef2d5d53 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/ex_2-spark.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "is_isin", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "is_isin", + "domain": "boolean" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_2/match_characters_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_2/match_characters_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/ex_2.json new file mode 100644 index 000000000..8cd1b5076 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/ex_2.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "is_isin", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "is_isin", + "domain": "boolean" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/ex_2.vtl new file mode 100644 index 000000000..cc645ee89 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_2 [ calc is_isin:= match_characters(Text_1, "\b([A-Z]{2})((?![A-Z]{10}\b)[A-Z0-9]{10})\b")]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_1/match_characters_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_1/match_characters_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_2/match_characters_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_2/match_characters_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/match_characters/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_1-spark.json new file mode 100644 index 000000000..ea2fb5178 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_1-spark.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_1/pattern_replacement_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_1/pattern_replacement_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_1.json new file mode 100644 index 000000000..c1f8c7780 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_1.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_1.vtl new file mode 100644 index 000000000..3211ca47c --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= replace(in_1#Text_1,"lorem","LOREM"); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_2-spark.json new file mode 100644 index 000000000..d683d4a2f --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_2-spark.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_2/pattern_replacement_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_2/pattern_replacement_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_2.json new file mode 100644 index 000000000..cf5938049 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_2.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_2.vtl new file mode 100644 index 000000000..d50d33b0e --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= replace(in_2#Text_1,"^*","-"); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_3-spark.json new file mode 100644 index 000000000..85e48e51a --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_3-spark.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "spark:csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "num_1", + "domain": "number" + }, + { + "name": "text_2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_3/pattern_replacement_3.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_3/pattern_replacement_3.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_3.json new file mode 100644 index 000000000..8010e88f7 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_3.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "num_1", + "domain": "number" + }, + { + "name": "text_2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_3.vtl new file mode 100644 index 000000000..e695cc940 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/ex_3.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_3[ calc Text_2:= replace(Text_1,"[aeiou]")]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_1/substring_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_1/substring_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_2/substring_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_2/substring_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_3/substring_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_3/substring_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/replace/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/ex_1-spark.json new file mode 100644 index 000000000..bdd7a9136 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/ex_1-spark.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_1/substring_extraction_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_1/substring_extraction_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/ex_1.json new file mode 100644 index 000000000..21b3d2284 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/ex_1.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/ex_1.vtl new file mode 100644 index 000000000..457769805 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= substr(in_1#Text_1,2,4); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/ex_2-spark.json new file mode 100644 index 000000000..bd59fc0e2 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/ex_2-spark.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "num_1", + "domain": "number" + }, + { + "name": "text_2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_2/substring_extraction_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_2/substring_extraction_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/ex_2.json new file mode 100644 index 000000000..f96cdfa24 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/ex_2.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "num_1", + "domain": "number" + }, + { + "name": "text_2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/ex_2.vtl new file mode 100644 index 000000000..b4755fd4a --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_2[ calc Text_2:= substr(Text_1,5,10)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_1/substring_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_1/substring_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_2/substring_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_2/substring_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/substr/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_1-spark.json new file mode 100644 index 000000000..3eaa2c553 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_1-spark.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "text_2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_1/string_trim_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_1/string_trim_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_1.json new file mode 100644 index 000000000..69e007414 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_1.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "text_2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_1.vtl new file mode 100644 index 000000000..1b4467182 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= trim(in_1); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_2-spark.json new file mode 100644 index 000000000..c87366642 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_2-spark.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "text_2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_2/string_trim_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_2/string_trim_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_2.json new file mode 100644 index 000000000..10665c8e7 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_2.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "text_2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_2.vtl new file mode 100644 index 000000000..085bc67fc --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= ltrim(in_2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_3-spark.json new file mode 100644 index 000000000..b3fccf80d --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_3-spark.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "spark:csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "text_2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_3/string_trim_3.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_3/string_trim_3.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_3.json new file mode 100644 index 000000000..438445ba4 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_3.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "text_2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_3.vtl new file mode 100644 index 000000000..a510e30b0 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_3.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= rtrim(in_3); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_4-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_4-spark.json new file mode 100644 index 000000000..408c728ea --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_4-spark.json @@ -0,0 +1,104 @@ +{ + "datasets": [ + { + "name": "in_4", + "source": "spark:csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "ex_4", + "structure": "ex_4_str", + "source": "spark:csv:ex_4.csv" + } + ], + "structures": [ + { + "name": "in_4_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_4_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_3", + "role": "Measure" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "text_4", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "text_3", + "domain": "string" + }, + { + "name": "text_4", + "domain": "string" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "text_2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_4/string_trim_4.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_4.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_4/string_trim_4.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_4.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_4.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_4.json new file mode 100644 index 000000000..b4949f443 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_4.json @@ -0,0 +1,104 @@ +{ + "datasets": [ + { + "name": "in_4", + "source": "csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "ex_4", + "structure": "ex_4_str", + "source": "csv:ex_4.csv" + } + ], + "structures": [ + { + "name": "in_4_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_4_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_3", + "role": "Measure" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "text_4", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "text_3", + "domain": "string" + }, + { + "name": "text_4", + "domain": "string" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "text_2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_4.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_4.vtl new file mode 100644 index 000000000..939738cb8 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/ex_4.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_4[ calc Text_3:= ltrim(Text_1), Text_4:= rtrim(Text_2)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_3/trim_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_3/trim_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_1/trim_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_1/trim_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_2/trim_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_2/trim_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_1/trim_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/in_4.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_1/trim_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/trim/in_4.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_1-spark.json new file mode 100644 index 000000000..876c1adce --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_1-spark.json @@ -0,0 +1,112 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "text_low", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "text_up", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "text_low", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "text_up", + "domain": "string" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "text_2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_1/case_conversion_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_1/case_conversion_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_1.json new file mode 100644 index 000000000..01955187d --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_1.json @@ -0,0 +1,112 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "text_low", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "text_up", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "text_low", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "text_up", + "domain": "string" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "text_2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_1.vtl new file mode 100644 index 000000000..9ab168d40 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_1[ calc Text_up:= upper(Text_1), Text_low:= lower(Text_2)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_2-spark.json new file mode 100644 index 000000000..bd3d754f6 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_2-spark.json @@ -0,0 +1,96 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "text_2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_2/case_conversion_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_2/case_conversion_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_2.json new file mode 100644 index 000000000..27eddf6f9 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_2.json @@ -0,0 +1,96 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "text_2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_2.vtl new file mode 100644 index 000000000..41434b8a8 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= upper(in_2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_3-spark.json new file mode 100644 index 000000000..9eb23564f --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_3-spark.json @@ -0,0 +1,96 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "spark:csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "text_2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_3/case_conversion_3.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_3/case_conversion_3.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_3.json new file mode 100644 index 000000000..335ccf846 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_3.json @@ -0,0 +1,96 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "text_2", + "role": "Measure" + }, + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + }, + { + "name": "text_2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_3.vtl new file mode 100644 index 000000000..01ca04f3a --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/ex_3.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= lower(in_3); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_2/trim_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_2/trim_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_3/trim_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_3/trim_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_4/trim_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_4/trim_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/03 String operators/upper_lower/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_1-spark.json new file mode 100644 index 000000000..03677a8c8 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_1-spark.json @@ -0,0 +1,56 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/abs/abs.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/abs/abs.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_1.json new file mode 100644 index 000000000..89ebb45fc --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_1.json @@ -0,0 +1,56 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_1.vtl new file mode 100644 index 000000000..70ac68eb1 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := abs(in_1); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_2-spark.json new file mode 100644 index 000000000..9b660e3c4 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_2-spark.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "number" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_1/absolute_value_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_1/absolute_value_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_2.json new file mode 100644 index 000000000..6c0cfabc5 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_2.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "number" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_2.vtl new file mode 100644 index 000000000..392fe5fe2 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= abs(in_2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_3-spark.json new file mode 100644 index 000000000..2f9f6f25c --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_3-spark.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "spark:csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "in_3_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_3_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "abs_3", + "role": "Measure" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "abs_3", + "domain": "number" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_2/absolute_value_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_2/absolute_value_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_3.json new file mode 100644 index 000000000..4acb367b2 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_3.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "in_3_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_3_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "abs_3", + "role": "Measure" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "abs_3", + "domain": "number" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_3.vtl new file mode 100644 index 000000000..ad81c5613 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/ex_3.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_3[calc Abs_3:= abs (Num_2)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/abs/number_test3.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/abs/number_test3.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_1/number_test7.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_1/number_test7.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_2/number_test7.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_2/number_test7.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/abs/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/add/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/add/ex_1-spark.json new file mode 100644 index 000000000..8022ec52f --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/add/ex_1-spark.json @@ -0,0 +1,64 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator1/self_defined_operator1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/add/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator1/self_defined_operator1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/add/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/add/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/add/ex_1.json new file mode 100644 index 000000000..e397745c6 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/add/ex_1.json @@ -0,0 +1,64 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/add/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/add/ex_1.vtl new file mode 100644 index 000000000..997c6658b --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/add/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_1 + in_1; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal/number_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/add/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal/number_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/add/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/ex_1-spark.json new file mode 100644 index 000000000..e9eed152c --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/ex_1-spark.json @@ -0,0 +1,43 @@ +{ + "datasets": [ + { + "name": "number_test2", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "in_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil/ceil.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil/ceil.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/ex_1.json new file mode 100644 index 000000000..44bb00281 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/ex_1.json @@ -0,0 +1,43 @@ +{ + "datasets": [ + { + "name": "number_test2", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "in_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil/ceil.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/ex_1.vtl similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil/ceil.vtl rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/ex_1.vtl diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/ex_2-spark.json new file mode 100644 index 000000000..01f4b1686 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/ex_2-spark.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "number" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_1/ceil_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_1/ceil_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/ex_2.json new file mode 100644 index 000000000..020979297 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/ex_2.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "number" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/ex_2.vtl new file mode 100644 index 000000000..8769d57cd --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= ceil (in_2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil/number_test3.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil/number_test3.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_1/number_test7.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_1/number_test7.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ceil/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/divide/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/divide/ex_1-spark.json new file mode 100644 index 000000000..43041208c --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/divide/ex_1-spark.json @@ -0,0 +1,64 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "number_ex_1_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "number_ex_1_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/div/div.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/divide/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/div/div.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/divide/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/divide/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/divide/ex_1.json new file mode 100644 index 000000000..fbae96210 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/divide/ex_1.json @@ -0,0 +1,64 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "number_ex_1_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "number_ex_1_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/divide/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/divide/ex_1.vtl new file mode 100644 index 000000000..60f5aff88 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/divide/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := (in_1 / in_1); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp/number_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/divide/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp/number_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/divide/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/ex_1-spark.json new file mode 100644 index 000000000..07f949860 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/ex_1-spark.json @@ -0,0 +1,68 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "number_ex_1_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "number_ex_1_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp/exp.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp/exp.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/ex_1.json new file mode 100644 index 000000000..73281be57 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/ex_1.json @@ -0,0 +1,68 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "number_ex_1_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "number_ex_1_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/ex_1.vtl new file mode 100644 index 000000000..715ab7e10 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := round(exp(in_1), 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/ex_2-spark.json new file mode 100644 index 000000000..5b92e635f --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/ex_2-spark.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "exp_3", + "role": "Measure" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "number" + }, + { + "name": "exp_3", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp_2/exp_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp_2/exp_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/ex_2.json new file mode 100644 index 000000000..c96b26049 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/ex_2.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "exp_3", + "role": "Measure" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "number" + }, + { + "name": "exp_3", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/ex_2.vtl new file mode 100644 index 000000000..c5aec9ae3 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_2[calc Exp_3:= round(exp(Num_2), 7)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter/number_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter/number_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp_2/number_test7.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp_2/number_test7.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/exp/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/ex_1-spark.json new file mode 100644 index 000000000..03677a8c8 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/ex_1-spark.json @@ -0,0 +1,56 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor/floor.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor/floor.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/ex_1.json new file mode 100644 index 000000000..89ebb45fc --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/ex_1.json @@ -0,0 +1,56 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/ex_1.vtl new file mode 100644 index 000000000..c7fa264c3 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := ceil(in_1); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/ex_2-spark.json new file mode 100644 index 000000000..01f4b1686 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/ex_2-spark.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "number" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor_1/floor_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor_1/floor_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/ex_2.json new file mode 100644 index 000000000..020979297 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/ex_2.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "number" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/ex_2.vtl new file mode 100644 index 000000000..5ddbc3cf9 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= floor(in_2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor/number_test3.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor/number_test3.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_2/number_test7.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_2/number_test7.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/floor/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_1-spark.json new file mode 100644 index 000000000..c7af1d286 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_1-spark.json @@ -0,0 +1,68 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln/ln.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln/ln.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_1.json new file mode 100644 index 000000000..30052440d --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_1.json @@ -0,0 +1,68 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_1.vtl new file mode 100644 index 000000000..f8ef07484 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := round(ln(in_1),2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_2-spark.json new file mode 100644 index 000000000..7ce818625 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_2-spark.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "integer" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_1/ln_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_1/ln_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_2.json new file mode 100644 index 000000000..bdf392e77 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_2.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "integer" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_2.vtl new file mode 100644 index 000000000..d68198b0b --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= round(ln(in_2), 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_3-spark.json new file mode 100644 index 000000000..29353af8c --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_3-spark.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "spark:csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "ln_3", + "role": "Measure" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "number" + }, + { + "name": "ln_3", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_2/ln_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_2/ln_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_3.json new file mode 100644 index 000000000..fc10e159d --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_3.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "ln_3", + "role": "Measure" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "number" + }, + { + "name": "ln_3", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_3.vtl new file mode 100644 index 000000000..19f3a3b2c --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/ex_3.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_3[calc Ln_3:= round(ln(Num_2), 7)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater/number_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater/number_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_1/number_test7.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_1/number_test7.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_floor_1/number_test7.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_floor_1/number_test7.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/ln/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/ex_1-spark.json new file mode 100644 index 000000000..fec6c6bee --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/ex_1-spark.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "integer" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_1/log_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_1/log_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/ex_1.json new file mode 100644 index 000000000..ef7583df7 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/ex_1.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "integer" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/ex_1.vtl new file mode 100644 index 000000000..639ef6efd --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= round(log(in_1, 2), 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/ex_2-spark.json new file mode 100644 index 000000000..7a8c0e895 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/ex_2-spark.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "log_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + }, + { + "name": "log_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "number" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "log_1", + "domain": "number" + }, + { + "name": "num_1", + "domain": "number" + }, + { + "name": "log_2", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_2/log_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_2/log_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/ex_2.json new file mode 100644 index 000000000..476897def --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/ex_2.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "log_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + }, + { + "name": "log_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "number" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "log_1", + "domain": "number" + }, + { + "name": "num_1", + "domain": "number" + }, + { + "name": "log_2", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/ex_2.vtl new file mode 100644 index 000000000..8a8c9ab64 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_2[calc Log_1:= round(log(Num_1,100), 7), Log_2:= round(log(Num_2,100), 7)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor_1/number_test7.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor_1/number_test7.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_1/number_test7.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_1/number_test7.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/log/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_1-spark.json new file mode 100644 index 000000000..296fb44a9 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_1-spark.json @@ -0,0 +1,78 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod/mod.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod/mod.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_1.json new file mode 100644 index 000000000..51f70b370 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_1.json @@ -0,0 +1,78 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_1.vtl new file mode 100644 index 000000000..c0ecb3a58 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := round(mod(in_1, in_2), 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_2-spark.json new file mode 100644 index 000000000..568db0547 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_2-spark.json @@ -0,0 +1,64 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_3_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "integer" + }, + { + "name": "time_period", + "domain": "integer" + }, + { + "name": "num_1", + "domain": "integer" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_1/mod_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_1/mod_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_2.json new file mode 100644 index 000000000..31a685ae7 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_2.json @@ -0,0 +1,64 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_3_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "integer" + }, + { + "name": "time_period", + "domain": "integer" + }, + { + "name": "num_1", + "domain": "integer" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_2.vtl new file mode 100644 index 000000000..4e2b1bbf3 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= mod(in_3, 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_3-spark.json new file mode 100644 index 000000000..ad89308f0 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_3-spark.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_4", + "source": "spark:csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "spark:csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "in_4_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_3_str", + "components": [ + { + "name": "mod_1", + "role": "Measure" + }, + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "integer" + }, + { + "name": "time_period", + "domain": "integer" + }, + { + "name": "mod_1", + "domain": "integer" + }, + { + "name": "num_1", + "domain": "integer" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_2/mod_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_2/mod_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_3.json new file mode 100644 index 000000000..d0150bebf --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_3.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_4", + "source": "csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "in_4_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_3_str", + "components": [ + { + "name": "mod_1", + "role": "Measure" + }, + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "integer" + }, + { + "name": "time_period", + "domain": "integer" + }, + { + "name": "mod_1", + "domain": "integer" + }, + { + "name": "num_1", + "domain": "integer" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_3.vtl new file mode 100644 index 000000000..a613aa479 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/ex_3.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_4[calc mod_1:= mod(Num_1, Num_2)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod/number_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod/number_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod/number_test2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod/number_test2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_1/mod_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_1/mod_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_2/mod_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/in_4.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_2/mod_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/mod/in_4.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/multiply/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/multiply/ex_1-spark.json new file mode 100644 index 000000000..8022ec52f --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/multiply/ex_1-spark.json @@ -0,0 +1,64 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mult/mult.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/multiply/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mult/mult.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/multiply/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/multiply/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/multiply/ex_1.json new file mode 100644 index 000000000..e397745c6 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/multiply/ex_1.json @@ -0,0 +1,64 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/multiply/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/multiply/ex_1.vtl new file mode 100644 index 000000000..a46f87bd1 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/multiply/ex_1.vtl @@ -0,0 +1,21 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ + test_result := round(in_1 * in_1, 2); + \ No newline at end of file diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greatereq/number_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/multiply/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greatereq/number_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/multiply/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/negative/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/negative/ex_1-spark.json new file mode 100644 index 000000000..c27321b3a --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/negative/ex_1-spark.json @@ -0,0 +1,51 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "ex_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uminus/uminus.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/negative/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uminus/uminus.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/negative/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/negative/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/negative/ex_1.json new file mode 100644 index 000000000..27e02e298 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/negative/ex_1.json @@ -0,0 +1,51 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "ex_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/negative/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/negative/ex_1.vtl new file mode 100644 index 000000000..3b21f50dd --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/negative/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := -in_1; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lesser/number_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/negative/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lesser/number_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/negative/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/positive/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/positive/ex_1-spark.json new file mode 100644 index 000000000..c27321b3a --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/positive/ex_1-spark.json @@ -0,0 +1,51 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "ex_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uplus/uplus.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/positive/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uplus/uplus.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/positive/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/positive/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/positive/ex_1.json new file mode 100644 index 000000000..27e02e298 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/positive/ex_1.json @@ -0,0 +1,51 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "ex_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/positive/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/positive/ex_1.vtl new file mode 100644 index 000000000..6a1acf8c0 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/positive/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := +in_1; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lessereq/number_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/positive/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lessereq/number_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/positive/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_1-spark.json new file mode 100644 index 000000000..c27321b3a --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_1-spark.json @@ -0,0 +1,51 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "ex_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pow/pow.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pow/pow.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_1.json new file mode 100644 index 000000000..27e02e298 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_1.json @@ -0,0 +1,51 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "ex_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_1.vtl new file mode 100644 index 000000000..d9f462f67 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := round(power(in_1, 3),2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_2-spark.json new file mode 100644 index 000000000..344b3490b --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_2-spark.json @@ -0,0 +1,64 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "integer" + }, + { + "name": "num_1", + "domain": "integer" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_1/power_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_1/power_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_2.json new file mode 100644 index 000000000..5058757c0 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_2.json @@ -0,0 +1,64 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "integer" + }, + { + "name": "num_1", + "domain": "integer" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_2.vtl new file mode 100644 index 000000000..ea9d918ef --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= round(power(in_2, in_2), 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_3-spark.json new file mode 100644 index 000000000..cd3ec20c7 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_3-spark.json @@ -0,0 +1,80 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "spark:csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "pow_1", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + }, + { + "name": "pow_2", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "integer" + }, + { + "name": "pow_1", + "domain": "integer" + }, + { + "name": "pow_2", + "domain": "number" + }, + { + "name": "num_1", + "domain": "integer" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_2/power_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_2/power_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_3.json new file mode 100644 index 000000000..561c415f1 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_3.json @@ -0,0 +1,80 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "pow_1", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + }, + { + "name": "pow_2", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "integer" + }, + { + "name": "pow_1", + "domain": "integer" + }, + { + "name": "pow_2", + "domain": "number" + }, + { + "name": "num_1", + "domain": "integer" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_3.vtl new file mode 100644 index 000000000..fe8a6092d --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/ex_3.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_3[calc Pow_1:= round(power(Num_1, 2), 7), Pow_2:= round(power(Num_2, Num_1), 7)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln/number_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln/number_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_1/power_1_in.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_1/power_1_in.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_2/power_2_in.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_2/power_2_in.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/power/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_1-spark.json new file mode 100644 index 000000000..fcf8c6382 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_1-spark.json @@ -0,0 +1,39 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "ex_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round/round.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round/round.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_1.json new file mode 100644 index 000000000..fbed6cbff --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_1.json @@ -0,0 +1,39 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "ex_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_1.vtl new file mode 100644 index 000000000..15a331935 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := round(in_1, 2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_2-spark.json new file mode 100644 index 000000000..01f4b1686 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_2-spark.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "number" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_1/round_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_1/round_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_2.json new file mode 100644 index 000000000..020979297 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_2.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "number" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_2.vtl new file mode 100644 index 000000000..088fe382c --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= round(in_2, 2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_3-spark.json new file mode 100644 index 000000000..9b29eeea6 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_3-spark.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "spark:csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "round_1", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "number" + }, + { + "name": "round_1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_2/round_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_2/round_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_3.json new file mode 100644 index 000000000..e9f03d217 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_3.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "round_1", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "number" + }, + { + "name": "round_1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_3.vtl new file mode 100644 index 000000000..0944b60ff --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/ex_3.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_3[calc round_1:= round(Num_2, 2)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round/number_test3.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round/number_test3.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_2/number_test7.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_2/number_test7.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_1/number_test7.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_1/number_test7.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/round/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_1-spark.json new file mode 100644 index 000000000..c27321b3a --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_1-spark.json @@ -0,0 +1,51 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "ex_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt/sqrt.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt/sqrt.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_1.json new file mode 100644 index 000000000..27e02e298 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_1.json @@ -0,0 +1,51 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "ex_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_1.vtl new file mode 100644 index 000000000..8c14a9386 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := round(sqrt(in_1),2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_2-spark.json new file mode 100644 index 000000000..130f9b005 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_2-spark.json @@ -0,0 +1,64 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "integer" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_1/sqrt_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_1/sqrt_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_2.json new file mode 100644 index 000000000..ef37f08c8 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_2.json @@ -0,0 +1,64 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "integer" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_2.vtl new file mode 100644 index 000000000..c5a97154c --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= round(sqrt(in_2), 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_3-spark.json new file mode 100644 index 000000000..d6cc5db31 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_3-spark.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "spark:csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "sqrt_3", + "role": "Measure" + }, + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "integer" + }, + { + "name": "sqrt_3", + "domain": "number" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_2/sqrt_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_2/sqrt_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_3.json new file mode 100644 index 000000000..f24ce430c --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_3.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "sqrt_3", + "role": "Measure" + }, + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "integer" + }, + { + "name": "sqrt_3", + "domain": "number" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_3.vtl new file mode 100644 index 000000000..204b50789 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/ex_3.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= round(in_3[calc Sqrt_3:= sqrt(Num_1)], 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/minus/number_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/minus/number_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_2/number_test7.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_2/number_test7.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_1/number_test7.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_1/number_test7.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/sqrt/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/subtract/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/subtract/ex_1-spark.json new file mode 100644 index 000000000..8022ec52f --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/subtract/ex_1-spark.json @@ -0,0 +1,64 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/minus/minus.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/subtract/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/minus/minus.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/subtract/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/subtract/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/subtract/ex_1.json new file mode 100644 index 000000000..e397745c6 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/subtract/ex_1.json @@ -0,0 +1,64 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/subtract/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/subtract/ex_1.vtl new file mode 100644 index 000000000..6f2e44c0e --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/subtract/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_1 - in_1; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mult/number_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/subtract/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mult/number_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/subtract/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/ex_1-spark.json new file mode 100644 index 000000000..db8e8512b --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/ex_1-spark.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "number" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_1/trunc_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_1/trunc_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/ex_1.json new file mode 100644 index 000000000..93743c460 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/ex_1.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "number" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/ex_1.vtl new file mode 100644 index 000000000..09c556001 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= trunc(in_1, 2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/ex_2-spark.json new file mode 100644 index 000000000..c1571b28d --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/ex_2-spark.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "trun", + "role": "Measure" + }, + { + "name": "roun", + "role": "Measure" + }, + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "number" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "roun", + "domain": "number" + }, + { + "name": "num_1", + "domain": "number" + }, + { + "name": "trun", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_2/trunc_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_2/trunc_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/ex_2.json new file mode 100644 index 000000000..a15b1d697 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/ex_2.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "trun", + "role": "Measure" + }, + { + "name": "roun", + "role": "Measure" + }, + { + "name": "time_period", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "num_2", + "domain": "number" + }, + { + "name": "time_period", + "domain": "number" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "roun", + "domain": "number" + }, + { + "name": "num_1", + "domain": "number" + }, + { + "name": "trun", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/ex_2.vtl new file mode 100644 index 000000000..aa64bb314 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/ex_2.vtl @@ -0,0 +1,20 @@ + /** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_2[calc roun:= round(Num_2, 1), trun:= trunc(Num_2, 1)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_2/number_test7.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_2/number_test7.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_1/number_test7.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_1/number_test7.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/04 Numeric operators/trunc/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/ex_1-spark.json new file mode 100644 index 000000000..3c49560c8 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/ex_1-spark.json @@ -0,0 +1,68 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "year", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "year", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_1/between_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_1/between_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/ex_1.json new file mode 100644 index 000000000..e17f7e24e --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/ex_1.json @@ -0,0 +1,68 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "year", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "year", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/ex_1.vtl new file mode 100644 index 000000000..a5c4ff31c --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= between(in_1, -1, 5); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/ex_2-spark.json new file mode 100644 index 000000000..8f10a30ee --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/ex_2-spark.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + }, + { + "name": "btwn", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "year", + "domain": "number" + }, + { + "name": "btwn", + "domain": "boolean" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_2/between_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_2/between_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/ex_2.json new file mode 100644 index 000000000..c031f2e7f --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/ex_2.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + }, + { + "name": "btwn", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "year", + "domain": "number" + }, + { + "name": "btwn", + "domain": "boolean" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/ex_2.vtl new file mode 100644 index 000000000..ef5a8c1fe --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_2[calc btwn:= between(Num_1, 4, 10)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_1/between_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_1/between_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_2/between_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_2/between_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/between/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_1-spark.json new file mode 100644 index 000000000..e62121142 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_1-spark.json @@ -0,0 +1,100 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "comparison_eq_1", + "source": "spark:csv:comparison_eq_1.csv", + "structure": "comparison_eq_1_str" + }, + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "comparison_eq_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal/equal.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal/equal.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_1.json new file mode 100644 index 000000000..084095794 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_1.json @@ -0,0 +1,100 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "comparison_eq_1", + "source": "csv:comparison_eq_1.csv", + "structure": "comparison_eq_1_str" + }, + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "comparison_eq_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_1.vtl new file mode 100644 index 000000000..98614a99f --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_1 = in_2; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_2-spark.json new file mode 100644 index 000000000..267197cf4 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_2-spark.json @@ -0,0 +1,152 @@ +{ + "datasets": [ + { + "name": "in_4", + "source": "spark:csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "in_5", + "source": "spark:csv:in_5.csv", + "structure": "in_5_str" + }, + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_4_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_5_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_1/eq_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_1/eq_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_2.json new file mode 100644 index 000000000..06be7b409 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_2.json @@ -0,0 +1,152 @@ +{ + "datasets": [ + { + "name": "in_4", + "source": "csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "in_5", + "source": "csv:in_5.csv", + "structure": "in_5_str" + }, + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_4_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_5_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_2.vtl new file mode 100644 index 000000000..49a8871ad --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_3=in_4; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_3-spark.json new file mode 100644 index 000000000..d16e3d8ac --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_3-spark.json @@ -0,0 +1,130 @@ +{ + "datasets": [ + { + "name": "in_7", + "source": "spark:csv:in_7.csv", + "structure": "in_7_str" + }, + { + "name": "in_6", + "source": "spark:csv:in_6.csv", + "structure": "in_6_str" + }, + { + "name": "ex_3", + "structure": "eq_2_str", + "source": "spark:csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "in_7_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_6_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "eq_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "eq", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "eq", + "domain": "boolean" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_2/equal_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_2/equal_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_3.json new file mode 100644 index 000000000..48614e64f --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_3.json @@ -0,0 +1,130 @@ +{ + "datasets": [ + { + "name": "in_7", + "source": "csv:in_7.csv", + "structure": "in_7_str" + }, + { + "name": "in_6", + "source": "csv:in_6.csv", + "structure": "in_6_str" + }, + { + "name": "ex_3", + "structure": "eq_2_str", + "source": "csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "in_7_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_6_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "eq_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "eq", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "eq", + "domain": "boolean" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_3.vtl new file mode 100644 index 000000000..1c8ca75d4 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/ex_3.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_6[calc eq:=Num_1=10]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/notequal/number_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/notequal/number_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal/number_test4.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal/number_test4.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_1/dataset_comparison_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_1/dataset_comparison_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_1/dataset_comparison_test2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/in_4.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_1/dataset_comparison_test2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/in_4.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_1/equal_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/in_5.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_1/equal_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/in_5.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_2/dataset_comparison_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/in_6.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_2/dataset_comparison_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/in_6.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_2/dataset_comparison_test2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/in_7.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_2/dataset_comparison_test2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/equal/in_7.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_1-spark.json new file mode 100644 index 000000000..ba05b7bd2 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_1-spark.json @@ -0,0 +1,90 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_1/exists_in_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_1/exists_in_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_1.json new file mode 100644 index 000000000..03dcdb4e0 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_1.json @@ -0,0 +1,90 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_1.vtl new file mode 100644 index 000000000..43099baba --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= exists_in(in_2, in_1); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_2-spark.json new file mode 100644 index 000000000..b05fb165e --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_2-spark.json @@ -0,0 +1,112 @@ +{ + "datasets": [ + { + "name": "in_4", + "source": "spark:csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "exists_in_1", + "source": "spark:csv:exists_in_1.csv", + "structure": "exists_in_1_str" + }, + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_4_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "exists_in_1_str", + "components": [ + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_2/exists_in_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_2/exists_in_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_2.json new file mode 100644 index 000000000..599f6dc49 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_2.json @@ -0,0 +1,112 @@ +{ + "datasets": [ + { + "name": "in_4", + "source": "csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "exists_in_1", + "source": "csv:exists_in_1.csv", + "structure": "exists_in_1_str" + }, + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_4_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "exists_in_1_str", + "components": [ + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_2.vtl new file mode 100644 index 000000000..427c701e7 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= exists_in(in_4,in_3,true); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_3-spark.json new file mode 100644 index 000000000..0b605d68e --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_3-spark.json @@ -0,0 +1,112 @@ +{ + "datasets": [ + { + "name": "in_6", + "source": "spark:csv:in_6.csv", + "structure": "in_6_str" + }, + { + "name": "exists_in_1", + "source": "spark:csv:exists_in_1.csv", + "structure": "exists_in_1_str" + }, + { + "name": "in_5", + "source": "spark:csv:in_5.csv", + "structure": "in_5_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "spark:csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_6_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "exists_in_1_str", + "components": [ + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_5_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_3/exists_in_3.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_3/exists_in_3.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_3.json new file mode 100644 index 000000000..efcac4d21 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_3.json @@ -0,0 +1,112 @@ +{ + "datasets": [ + { + "name": "in_6", + "source": "csv:in_6.csv", + "structure": "in_6_str" + }, + { + "name": "exists_in_1", + "source": "csv:exists_in_1.csv", + "structure": "exists_in_1_str" + }, + { + "name": "in_5", + "source": "csv:in_5.csv", + "structure": "in_5_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_6_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "exists_in_1_str", + "components": [ + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_5_str", + "components": [ + { + "name": "text_1", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "text_1", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_3.vtl new file mode 100644 index 000000000..fa6857794 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/ex_3.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= exists_in(in_6,in_5,false); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_1/exists_in_test2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_1/exists_in_test2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_3/match_characters_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_3/match_characters_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_2/exists_in_test2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_2/exists_in_test2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_1/match_characters_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/in_4.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_1/match_characters_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/in_4.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_3/exists_in_test2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/in_5.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_3/exists_in_test2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/in_5.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_2/match_characters_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/in_6.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_2/match_characters_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/exists_in/in_6.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_or_equal_than/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_or_equal_than/ex_1-spark.json new file mode 100644 index 000000000..43e881015 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_or_equal_than/ex_1-spark.json @@ -0,0 +1,82 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greatereq/greatereq.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_or_equal_than/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greatereq/greatereq.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_or_equal_than/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_or_equal_than/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_or_equal_than/ex_1.json new file mode 100644 index 000000000..4bee4311d --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_or_equal_than/ex_1.json @@ -0,0 +1,82 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_or_equal_than/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_or_equal_than/ex_1.vtl new file mode 100644 index 000000000..d5b2abc6c --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_or_equal_than/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_1 >= in_2; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/op_with_calculated_scalar/number_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_or_equal_than/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/op_with_calculated_scalar/number_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_or_equal_than/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater/number_test4.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_or_equal_than/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater/number_test4.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_or_equal_than/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_1-spark.json new file mode 100644 index 000000000..400d3b135 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_1-spark.json @@ -0,0 +1,82 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater/greater.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater/greater.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_1.json new file mode 100644 index 000000000..a0275c295 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_1.json @@ -0,0 +1,82 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_1.vtl new file mode 100644 index 000000000..7e737135a --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_1 > in_2; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_2-spark.json new file mode 100644 index 000000000..f2e53ce42 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_2-spark.json @@ -0,0 +1,152 @@ +{ + "datasets": [ + { + "name": "in_5", + "source": "spark:csv:in_5.csv", + "structure": "in_5_str" + }, + { + "name": "in_4", + "source": "spark:csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_5_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_4_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_1/gr_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_1/gr_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_2.json new file mode 100644 index 000000000..030e451ca --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_2.json @@ -0,0 +1,152 @@ +{ + "datasets": [ + { + "name": "in_5", + "source": "csv:in_5.csv", + "structure": "in_5_str" + }, + { + "name": "in_4", + "source": "csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_5_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_4_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_2.vtl new file mode 100644 index 000000000..e2cf3bd5d --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_3>in_4; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_3-spark.json new file mode 100644 index 000000000..2a6db54cc --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_3-spark.json @@ -0,0 +1,130 @@ +{ + "datasets": [ + { + "name": "in_7", + "source": "spark:csv:in_7.csv", + "structure": "in_7_str" + }, + { + "name": "in_6", + "source": "spark:csv:in_6.csv", + "structure": "in_6_str" + }, + { + "name": "ex_3", + "structure": "gr_2_str", + "source": "spark:csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "gr_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "gr", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_7_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_6_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "gr", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_2/greater_than_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_2/greater_than_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_3.json new file mode 100644 index 000000000..e5c1d484e --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_3.json @@ -0,0 +1,130 @@ +{ + "datasets": [ + { + "name": "in_7", + "source": "csv:in_7.csv", + "structure": "in_7_str" + }, + { + "name": "in_6", + "source": "csv:in_6.csv", + "structure": "in_6_str" + }, + { + "name": "ex_3", + "structure": "gr_2_str", + "source": "csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "gr_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "gr", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_7_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_6_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "gr", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_3.vtl new file mode 100644 index 000000000..4383c1677 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/ex_3.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_7[calc gr:= Num_1 >= 4]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/plus/number_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/plus/number_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greatereq/number_test4.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greatereq/number_test4.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_1/dataset_comparison_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_1/dataset_comparison_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_1/dataset_comparison_test2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/in_4.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_1/dataset_comparison_test2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/in_4.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_1/greater_than_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/in_5.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_1/greater_than_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/in_5.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_2/dataset_comparison_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/in_6.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_2/dataset_comparison_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/in_6.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_2/dataset_comparison_test2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/in_7.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_2/dataset_comparison_test2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/greater_than/in_7.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_1-spark.json new file mode 100644 index 000000000..a00dac27c --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_1-spark.json @@ -0,0 +1,68 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "year", + "role": "Identifier" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "year", + "domain": "integer" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "integer" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_1/element_of_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_1/element_of_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_1.json new file mode 100644 index 000000000..308dc901f --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_1.json @@ -0,0 +1,68 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "year", + "role": "Identifier" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "year", + "domain": "integer" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "integer" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_1.vtl new file mode 100644 index 000000000..850169f36 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_1 in { 0, 3, 6, 12 }; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_2-spark.json new file mode 100644 index 000000000..a0d234c47 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_2-spark.json @@ -0,0 +1,68 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "year", + "role": "Identifier" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "year", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_2/element_of_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_2/element_of_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_2.json new file mode 100644 index 000000000..35caf81d0 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_2.json @@ -0,0 +1,68 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "year", + "role": "Identifier" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "year", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_2.vtl new file mode 100644 index 000000000..0c324ae84 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_2#Year in {1996, 2000, 2004, 2008, 2012, 2016, 2020, 2024}; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_3-spark.json new file mode 100644 index 000000000..12c13ceca --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_3-spark.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "spark:csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_3_str", + "components": [ + { + "name": "isleap", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "isleap", + "domain": "boolean" + }, + { + "name": "year", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_3/element_of_3.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_3/element_of_3.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_3.json new file mode 100644 index 000000000..94d22580b --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_3.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_3_str", + "components": [ + { + "name": "isleap", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "isleap", + "domain": "boolean" + }, + { + "name": "year", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_3.vtl new file mode 100644 index 000000000..47171b136 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/ex_3.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_3[ calc isleap:= Year in {1996, 2000, 2004, 2008, 2012, 2016, 2020, 2024}]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_1/between_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_1/between_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_2/between_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_2/between_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_3/between_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_3/between_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/in/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/ex_1-spark.json new file mode 100644 index 000000000..d1614cd8a --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/ex_1-spark.json @@ -0,0 +1,122 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_1/is_null_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_1/is_null_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/ex_1.json new file mode 100644 index 000000000..56371dbba --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/ex_1.json @@ -0,0 +1,122 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/ex_1.vtl new file mode 100644 index 000000000..0af79962f --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= isnull(in_2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/ex_2-spark.json new file mode 100644 index 000000000..35b3f0914 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/ex_2-spark.json @@ -0,0 +1,100 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_2", + "structure": "isnull_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "isnull_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "isnl", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "isnl", + "domain": "boolean" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_2/is_null_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_2/is_null_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/ex_2.json new file mode 100644 index 000000000..af08fe8dd --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/ex_2.json @@ -0,0 +1,100 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_2", + "structure": "isnull_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "isnull_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "isnl", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "isnl", + "domain": "boolean" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/ex_2.vtl new file mode 100644 index 000000000..498887710 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_3[ calc Isnl := isnull(Me_1)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_1/isnull_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_1/isnull_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_1/isnull_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_1/isnull_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_2/isnull_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_2/isnull_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/is_null/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_or_equal_than/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_or_equal_than/ex_1-spark.json new file mode 100644 index 000000000..43e881015 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_or_equal_than/ex_1-spark.json @@ -0,0 +1,82 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lessereq/lessereq.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_or_equal_than/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lessereq/lessereq.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_or_equal_than/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_or_equal_than/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_or_equal_than/ex_1.json new file mode 100644 index 000000000..4bee4311d --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_or_equal_than/ex_1.json @@ -0,0 +1,82 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_or_equal_than/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_or_equal_than/ex_1.vtl new file mode 100644 index 000000000..526e7fb5f --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_or_equal_than/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_1 <= in_2; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pow/number_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_or_equal_than/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pow/number_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_or_equal_than/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lesser/number_test4.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_or_equal_than/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lesser/number_test4.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_or_equal_than/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/ex_1-spark.json new file mode 100644 index 000000000..5305459c6 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/ex_1-spark.json @@ -0,0 +1,81 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + } + ] + } ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lesser/lesser.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lesser/lesser.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/ex_1.json new file mode 100644 index 000000000..3efaa54c1 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/ex_1.json @@ -0,0 +1,81 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + } + ] + } ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/ex_1.vtl new file mode 100644 index 000000000..9ec81b60c --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_1 < in_2; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/ex_2-spark.json new file mode 100644 index 000000000..de34fe6a6 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/ex_2-spark.json @@ -0,0 +1,130 @@ +{ + "datasets": [ + { + "name": "in_4", + "source": "spark:csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_4_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "le", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "le", + "domain": "boolean" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/less_than_1/less_than_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/less_than_1/less_than_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/ex_2.json new file mode 100644 index 000000000..a3c4cb3d3 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/ex_2.json @@ -0,0 +1,130 @@ +{ + "datasets": [ + { + "name": "in_4", + "source": "csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_4_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "le", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "le", + "domain": "boolean" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/ex_2.vtl new file mode 100644 index 000000000..2bd8e693a --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_4[calc le:= Num_1 < 2]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename/number_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename/number_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lessereq/number_test4.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lessereq/number_test4.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/less_than_1/dataset_comparison_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/less_than_1/dataset_comparison_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/less_than_1/dataset_comparison_test2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/in_4.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/less_than_1/dataset_comparison_test2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/lesser_than/in_4.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_1-spark.json new file mode 100644 index 000000000..43e881015 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_1-spark.json @@ -0,0 +1,82 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/notequal/notequal.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/notequal/notequal.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_1.json new file mode 100644 index 000000000..4bee4311d --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_1.json @@ -0,0 +1,82 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_1.vtl new file mode 100644 index 000000000..1c5569e11 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_1 <> in_2; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_2-spark.json new file mode 100644 index 000000000..7da779fe9 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_2-spark.json @@ -0,0 +1,152 @@ +{ + "datasets": [ + { + "name": "in_5", + "source": "spark:csv:in_5.csv", + "structure": "in_5_str" + }, + { + "name": "in_4", + "source": "spark:csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_5_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_4_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_1/neq_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_1/neq_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_2.json new file mode 100644 index 000000000..4788ed650 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_2.json @@ -0,0 +1,152 @@ +{ + "datasets": [ + { + "name": "in_5", + "source": "csv:in_5.csv", + "structure": "in_5_str" + }, + { + "name": "in_4", + "source": "csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_5_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "bool_var", + "role": "Measure" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + }, + { + "name": "in_4_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_2.vtl new file mode 100644 index 000000000..263e96d44 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_3<>in_4; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_3-spark.json new file mode 100644 index 000000000..dd5561bfe --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_3-spark.json @@ -0,0 +1,130 @@ +{ + "datasets": [ + { + "name": "in_7", + "source": "spark:csv:in_7.csv", + "structure": "in_7_str" + }, + { + "name": "in_6", + "source": "spark:csv:in_6.csv", + "structure": "in_6_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "spark:csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "neq", + "role": "Measure" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_7_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_6_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "neq", + "domain": "boolean" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_2/not_equal_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_2/not_equal_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_3.json new file mode 100644 index 000000000..342c0ffa1 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_3.json @@ -0,0 +1,130 @@ +{ + "datasets": [ + { + "name": "in_7", + "source": "csv:in_7.csv", + "structure": "in_7_str" + }, + { + "name": "in_6", + "source": "csv:in_6.csv", + "structure": "in_6_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "neq", + "role": "Measure" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_7_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_6_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "neq", + "domain": "boolean" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_3.vtl new file mode 100644 index 000000000..95bce4018 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/ex_3.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_6[calc neq:=Num_1<>4]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator1/number_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator1/number_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/notequal/number_test4.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/notequal/number_test4.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_1/dataset_comparison_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_1/dataset_comparison_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_1/dataset_comparison_test2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/in_4.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_1/dataset_comparison_test2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/in_4.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_1/not_equal_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/in_5.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_1/not_equal_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/in_5.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_2/dataset_comparison_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/in_6.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_2/dataset_comparison_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/in_6.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_2/dataset_comparison_test2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/in_7.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_2/dataset_comparison_test2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/05 Comparison operators/not_equal/in_7.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_1-spark.json new file mode 100644 index 000000000..e965ec2b4 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_1-spark.json @@ -0,0 +1,122 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "me_1", + "domain": "boolean" + }, + { + "name": "id_2", + "domain": "number" + }, + { + "name": "id_4", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_1/and_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_1/and_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_1.json new file mode 100644 index 000000000..6467808f4 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_1.json @@ -0,0 +1,122 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "me_1", + "domain": "boolean" + }, + { + "name": "id_2", + "domain": "number" + }, + { + "name": "id_4", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_1.vtl new file mode 100644 index 000000000..8d1e9e8dd --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_1 and in_2; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_2-spark.json new file mode 100644 index 000000000..cad12a51a --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_2-spark.json @@ -0,0 +1,112 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "andt", + "role": "Measure" + }, + { + "name": "andf", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "andt", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "andf", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "boolean" + }, + { + "name": "id_2", + "domain": "number" + }, + { + "name": "id_4", + "domain": "number" + }, + { + "name": "res1", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_2/and_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_2/and_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_2.json new file mode 100644 index 000000000..a7b0e34e2 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_2.json @@ -0,0 +1,112 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "andt", + "role": "Measure" + }, + { + "name": "andf", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "andt", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "andf", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "boolean" + }, + { + "name": "id_2", + "domain": "number" + }, + { + "name": "id_4", + "domain": "number" + }, + { + "name": "res1", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_2.vtl new file mode 100644 index 000000000..a932790cd --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_3[calc andT:= Me_1 and true, andF:= Me_1 and false]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_3-spark.json new file mode 100644 index 000000000..8d651253e --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_3-spark.json @@ -0,0 +1,74 @@ +{ + "datasets": [ + { + "name": "in_5", + "source": "spark:csv:in_5.csv", + "structure": "in_5_str" + }, + { + "name": "in_4", + "source": "spark:csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "spark:csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "in_5_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_4_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_3_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "m1", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_1/boolean_and_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_1/boolean_and_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_3.json new file mode 100644 index 000000000..8307056d4 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_3.json @@ -0,0 +1,74 @@ +{ + "datasets": [ + { + "name": "in_5", + "source": "csv:in_5.csv", + "structure": "in_5_str" + }, + { + "name": "in_4", + "source": "csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "in_5_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_4_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_3_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "m1", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_3.vtl new file mode 100644 index 000000000..058efc7fe --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_3.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_4 and in_5; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_4-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_4-spark.json new file mode 100644 index 000000000..8afe11681 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_4-spark.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_6", + "source": "spark:csv:in_6.csv", + "structure": "in_6_str" + }, + { + "name": "ex_4", + "structure": "ex_4_str", + "source": "spark:csv:ex_4.csv" + } + ], + "structures": [ + { + "name": "in_6_str", + "components": [ + { + "name": "m2", + "role": "Measure" + }, + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_4_str", + "components": [ + { + "name": "m2", + "role": "Measure" + }, + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "m3", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id1", + "domain": "string" + }, + { + "name": "m3", + "domain": "boolean" + }, + { + "name": "m2", + "domain": "boolean" + }, + { + "name": "m1", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_2/boolean_and_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_4.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_2/boolean_and_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_4.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_4.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_4.json new file mode 100644 index 000000000..6198b272b --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_4.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_6", + "source": "csv:in_6.csv", + "structure": "in_6_str" + }, + { + "name": "ex_4", + "structure": "ex_4_str", + "source": "csv:ex_4.csv" + } + ], + "structures": [ + { + "name": "in_6_str", + "components": [ + { + "name": "m2", + "role": "Measure" + }, + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_4_str", + "components": [ + { + "name": "m2", + "role": "Measure" + }, + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "m3", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id1", + "domain": "string" + }, + { + "name": "m3", + "domain": "boolean" + }, + { + "name": "m2", + "domain": "boolean" + }, + { + "name": "m1", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_4.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_4.vtl new file mode 100644 index 000000000..35fbca349 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/ex_4.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_6[calc m3 := m1 and m2]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_1/boolean_test4.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_1/boolean_test4.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_1/boolean_test5.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_1/boolean_test5.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_2/boolean_test4.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_2/boolean_test4.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_1/boolean_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/in_4.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_1/boolean_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/in_4.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_1/boolean_test2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/in_5.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_1/boolean_test2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/in_5.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_2/boolean_test3.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/in_6.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_2/boolean_test3.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/and/in_6.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_1-spark.json new file mode 100644 index 000000000..6022248a0 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_1-spark.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "me_1", + "domain": "boolean" + }, + { + "name": "id_2", + "domain": "number" + }, + { + "name": "id_4", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_1/not_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_1/not_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_1.json new file mode 100644 index 000000000..b9a381b67 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_1.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "me_1", + "domain": "boolean" + }, + { + "name": "id_2", + "domain": "number" + }, + { + "name": "id_4", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_1.vtl new file mode 100644 index 000000000..dad1a3dd9 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= not in_1; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_2-spark.json new file mode 100644 index 000000000..5292b4186 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_2-spark.json @@ -0,0 +1,100 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_not", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "me_not", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "me_1", + "domain": "boolean" + }, + { + "name": "id_2", + "domain": "number" + }, + { + "name": "id_4", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_2/not_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_2/not_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_2.json new file mode 100644 index 000000000..064ad16b2 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_2.json @@ -0,0 +1,100 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_not", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "me_not", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "me_1", + "domain": "boolean" + }, + { + "name": "id_2", + "domain": "number" + }, + { + "name": "id_4", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_2.vtl new file mode 100644 index 000000000..d400ac7fc --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_2[calc Me_not:= not Me_1]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_3-spark.json new file mode 100644 index 000000000..5ef0da5f7 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_3-spark.json @@ -0,0 +1,56 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "spark:csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "in_3_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_3_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "m1", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_not_1/boolean_not_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_not_1/boolean_not_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_3.json new file mode 100644 index 000000000..693660000 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_3.json @@ -0,0 +1,56 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "in_3_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_3_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "m1", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_3.vtl new file mode 100644 index 000000000..6cbefd3d9 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/ex_3.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := not in_3; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_1/boolean_test4.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_1/boolean_test4.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_2/boolean_test4.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_2/boolean_test4.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_not_1/boolean_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_not_1/boolean_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/not/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_1-spark.json new file mode 100644 index 000000000..e965ec2b4 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_1-spark.json @@ -0,0 +1,122 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "me_1", + "domain": "boolean" + }, + { + "name": "id_2", + "domain": "number" + }, + { + "name": "id_4", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_1/or_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_1/or_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_1.json new file mode 100644 index 000000000..6467808f4 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_1.json @@ -0,0 +1,122 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "me_1", + "domain": "boolean" + }, + { + "name": "id_2", + "domain": "number" + }, + { + "name": "id_4", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_1.vtl new file mode 100644 index 000000000..0e19bdc95 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_1 or in_2; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_2-spark.json new file mode 100644 index 000000000..c0fe46f40 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_2-spark.json @@ -0,0 +1,112 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "orf", + "role": "Measure" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "ort", + "role": "Measure" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "ort", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "me_1", + "domain": "boolean" + }, + { + "name": "id_2", + "domain": "number" + }, + { + "name": "id_4", + "domain": "number" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "orf", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_2/or_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_2/or_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_2.json new file mode 100644 index 000000000..8847cb81b --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_2.json @@ -0,0 +1,112 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "orf", + "role": "Measure" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "ort", + "role": "Measure" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "ort", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "me_1", + "domain": "boolean" + }, + { + "name": "id_2", + "domain": "number" + }, + { + "name": "id_4", + "domain": "number" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "orf", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_2.vtl new file mode 100644 index 000000000..cca3872f6 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_3[calc orT:= Me_1 or true, orF:= Me_1 or false]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_3-spark.json new file mode 100644 index 000000000..8d651253e --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_3-spark.json @@ -0,0 +1,74 @@ +{ + "datasets": [ + { + "name": "in_5", + "source": "spark:csv:in_5.csv", + "structure": "in_5_str" + }, + { + "name": "in_4", + "source": "spark:csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "spark:csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "in_5_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_4_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_3_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "m1", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_1/boolean_or_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_1/boolean_or_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_3.json new file mode 100644 index 000000000..8307056d4 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_3.json @@ -0,0 +1,74 @@ +{ + "datasets": [ + { + "name": "in_5", + "source": "csv:in_5.csv", + "structure": "in_5_str" + }, + { + "name": "in_4", + "source": "csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "in_5_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_4_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_3_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "m1", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_3.vtl new file mode 100644 index 000000000..dd3d7ac91 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_3.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_4 or in_5; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_4-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_4-spark.json new file mode 100644 index 000000000..8afe11681 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_4-spark.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_6", + "source": "spark:csv:in_6.csv", + "structure": "in_6_str" + }, + { + "name": "ex_4", + "structure": "ex_4_str", + "source": "spark:csv:ex_4.csv" + } + ], + "structures": [ + { + "name": "in_6_str", + "components": [ + { + "name": "m2", + "role": "Measure" + }, + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_4_str", + "components": [ + { + "name": "m2", + "role": "Measure" + }, + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "m3", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id1", + "domain": "string" + }, + { + "name": "m3", + "domain": "boolean" + }, + { + "name": "m2", + "domain": "boolean" + }, + { + "name": "m1", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_2/boolean_or_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_4.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_2/boolean_or_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_4.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_4.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_4.json new file mode 100644 index 000000000..6198b272b --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_4.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_6", + "source": "csv:in_6.csv", + "structure": "in_6_str" + }, + { + "name": "ex_4", + "structure": "ex_4_str", + "source": "csv:ex_4.csv" + } + ], + "structures": [ + { + "name": "in_6_str", + "components": [ + { + "name": "m2", + "role": "Measure" + }, + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_4_str", + "components": [ + { + "name": "m2", + "role": "Measure" + }, + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "m3", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id1", + "domain": "string" + }, + { + "name": "m3", + "domain": "boolean" + }, + { + "name": "m2", + "domain": "boolean" + }, + { + "name": "m1", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_4.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_4.vtl new file mode 100644 index 000000000..faaedc43d --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/ex_4.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_6[calc m3 := m1 or m2]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_1/boolean_test4.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_1/boolean_test4.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_1/boolean_test5.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_1/boolean_test5.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_2/boolean_test4.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_2/boolean_test4.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_1/boolean_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/in_4.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_1/boolean_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/in_4.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_1/boolean_test2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/in_5.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_1/boolean_test2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/in_5.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_2/boolean_test3.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/in_6.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_2/boolean_test3.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/or/in_6.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_1-spark.json new file mode 100644 index 000000000..e965ec2b4 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_1-spark.json @@ -0,0 +1,122 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "me_1", + "domain": "boolean" + }, + { + "name": "id_2", + "domain": "number" + }, + { + "name": "id_4", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_1/xor_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_1/xor_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_1.json new file mode 100644 index 000000000..6467808f4 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_1.json @@ -0,0 +1,122 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "me_1", + "domain": "boolean" + }, + { + "name": "id_2", + "domain": "number" + }, + { + "name": "id_4", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_1.vtl new file mode 100644 index 000000000..648aeef1a --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_1 xor in_2; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_2-spark.json new file mode 100644 index 000000000..3fc43078c --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_2-spark.json @@ -0,0 +1,100 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "xorf", + "role": "Measure" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "me_1", + "domain": "boolean" + }, + { + "name": "id_2", + "domain": "integer" + }, + { + "name": "id_4", + "domain": "integer" + }, + { + "name": "xorf", + "domain": "boolean" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_2/xor_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_2/xor_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_2.json new file mode 100644 index 000000000..5ee526bb2 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_2.json @@ -0,0 +1,100 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "xorf", + "role": "Measure" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "me_1", + "domain": "boolean" + }, + { + "name": "id_2", + "domain": "integer" + }, + { + "name": "id_4", + "domain": "integer" + }, + { + "name": "xorf", + "domain": "boolean" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_2.vtl new file mode 100644 index 000000000..10d12ec9a --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_3[calc xorF:= Me_1 xor false]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_3-spark.json new file mode 100644 index 000000000..8d651253e --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_3-spark.json @@ -0,0 +1,74 @@ +{ + "datasets": [ + { + "name": "in_5", + "source": "spark:csv:in_5.csv", + "structure": "in_5_str" + }, + { + "name": "in_4", + "source": "spark:csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "spark:csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "in_5_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_4_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_3_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "m1", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_1/boolean_xor_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_1/boolean_xor_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_3.json new file mode 100644 index 000000000..8307056d4 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_3.json @@ -0,0 +1,74 @@ +{ + "datasets": [ + { + "name": "in_5", + "source": "csv:in_5.csv", + "structure": "in_5_str" + }, + { + "name": "in_4", + "source": "csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "in_5_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "in_4_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_3_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "m1", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_3.vtl new file mode 100644 index 000000000..e1e3d54e0 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_3.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_4 xor in_5; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_4-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_4-spark.json new file mode 100644 index 000000000..8afe11681 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_4-spark.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_6", + "source": "spark:csv:in_6.csv", + "structure": "in_6_str" + }, + { + "name": "ex_4", + "structure": "ex_4_str", + "source": "spark:csv:ex_4.csv" + } + ], + "structures": [ + { + "name": "in_6_str", + "components": [ + { + "name": "m2", + "role": "Measure" + }, + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_4_str", + "components": [ + { + "name": "m2", + "role": "Measure" + }, + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "m3", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id1", + "domain": "string" + }, + { + "name": "m3", + "domain": "boolean" + }, + { + "name": "m2", + "domain": "boolean" + }, + { + "name": "m1", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_2/boolean_xor_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_4.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_2/boolean_xor_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_4.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_4.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_4.json new file mode 100644 index 000000000..6198b272b --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_4.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_6", + "source": "csv:in_6.csv", + "structure": "in_6_str" + }, + { + "name": "ex_4", + "structure": "ex_4_str", + "source": "csv:ex_4.csv" + } + ], + "structures": [ + { + "name": "in_6_str", + "components": [ + { + "name": "m2", + "role": "Measure" + }, + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + }, + { + "name": "ex_4_str", + "components": [ + { + "name": "m2", + "role": "Measure" + }, + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "m3", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id1", + "domain": "string" + }, + { + "name": "m3", + "domain": "boolean" + }, + { + "name": "m2", + "domain": "boolean" + }, + { + "name": "m1", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_4.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_4.vtl new file mode 100644 index 000000000..ffdc3e733 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/ex_4.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_6[calc m3 := m1 xor m2]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_1/boolean_test4.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_1/boolean_test4.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_1/boolean_test5.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_1/boolean_test5.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_2/boolean_test4.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_2/boolean_test4.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_1/boolean_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/in_4.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_1/boolean_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/in_4.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_1/boolean_test2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/in_5.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_1/boolean_test2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/in_5.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_2/boolean_test3.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/in_6.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_2/boolean_test3.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/06 Boolean operators/xor_1/in_6.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/ex_1-spark.json new file mode 100644 index 000000000..4f7fc01ab --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/ex_1-spark.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_date", + "role": "Identifier" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_date", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "res4", + "domain": "boolean" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "id_date", + "domain": "date" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_1/fill_timeseries_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_1/fill_timeseries_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/ex_1.json new file mode 100644 index 000000000..13c993a9b --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/ex_1.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_date", + "role": "Identifier" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_date", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "res4", + "domain": "boolean" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "id_date", + "domain": "date" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/ex_1.vtl new file mode 100644 index 000000000..24775c89e --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= fill_time_series(in_1); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/ex_2-spark.json new file mode 100644 index 000000000..edf244a87 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/ex_2-spark.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_date", + "role": "Identifier" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_date", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "res4", + "domain": "boolean" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "id_date", + "domain": "date" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_2/fill_timeseries_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_2/fill_timeseries_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/ex_2.json new file mode 100644 index 000000000..a693c3f86 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/ex_2.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_date", + "role": "Identifier" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_date", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "res4", + "domain": "boolean" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "id_date", + "domain": "date" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/ex_2.vtl new file mode 100644 index 000000000..b795125b6 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= fill_time_series(in_2, single); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_1/fill_timeseries_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_1/fill_timeseries_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_2/fill_timeseries_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_2/fill_timeseries_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/fill_timeseries_1/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/ex_1-spark.json new file mode 100644 index 000000000..08436a3ef --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/ex_1-spark.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_date", + "role": "Identifier" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_date", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "res4", + "domain": "boolean" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "id_date", + "domain": "date" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_1/flow_to_stock_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_1/flow_to_stock_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/ex_1.json new file mode 100644 index 000000000..91b00a02e --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/ex_1.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_date", + "role": "Identifier" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_date", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "res4", + "domain": "boolean" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "id_date", + "domain": "date" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/ex_1.vtl new file mode 100644 index 000000000..d394dde4d --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= flow_to_stock(in_1); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/ex_2-spark.json new file mode 100644 index 000000000..7be81fc7d --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/ex_2-spark.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "id_annual", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id_annual", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_annual", + "domain": "date" + }, + { + "name": "res4", + "domain": "boolean" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_2/flow_to_stock_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_2/flow_to_stock_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/ex_2.json new file mode 100644 index 000000000..c7d3638c9 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/ex_2.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "id_annual", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id_annual", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_annual", + "domain": "date" + }, + { + "name": "res4", + "domain": "boolean" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/ex_2.vtl new file mode 100644 index 000000000..ee62c0a8f --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= flow_to_stock(in_2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_1/flow_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_1/flow_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_2/flow_annual_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_2/flow_annual_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/flow_to_stock_1/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/ex_1-spark.json new file mode 100644 index 000000000..90f20de2c --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/ex_1-spark.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_daily", + "role": "Identifier" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_daily", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "res4", + "domain": "boolean" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_daily", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_1/stock_to_flow_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_1/stock_to_flow_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/ex_1.json new file mode 100644 index 000000000..b41f2ca64 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/ex_1.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_daily", + "role": "Identifier" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_daily", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "res4", + "domain": "boolean" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_daily", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/ex_1.vtl new file mode 100644 index 000000000..3398481dc --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= stock_to_flow(in_1); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/ex_2-spark.json new file mode 100644 index 000000000..fc6c494a5 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/ex_2-spark.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_annual", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_annual", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_annual", + "domain": "date" + }, + { + "name": "res4", + "domain": "boolean" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_2/stock_to_flow_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_2/stock_to_flow_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/ex_2.json new file mode 100644 index 000000000..72da87e32 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/ex_2.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_annual", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_annual", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_annual", + "domain": "date" + }, + { + "name": "res4", + "domain": "boolean" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/ex_2.vtl new file mode 100644 index 000000000..90b1a89b4 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= stock_to_flow(in_2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_1/stock_daily_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_1/stock_daily_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_2/stock_annual_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_2/stock_annual_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/stock_to_flow_1/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/ex_1-spark.json new file mode 100644 index 000000000..9b037d771 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/ex_1-spark.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_daily", + "role": "Identifier" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_daily", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "res4", + "domain": "boolean" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_daily", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "integer" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_1/timeshift_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_1/timeshift_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/ex_1.json new file mode 100644 index 000000000..5012f4d37 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/ex_1.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_daily", + "role": "Identifier" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_daily", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "res4", + "domain": "boolean" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_daily", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "integer" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/ex_1.vtl new file mode 100644 index 000000000..4865412ab --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= timeshift(in_1, 3); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/ex_2-spark.json new file mode 100644 index 000000000..4548aac4f --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/ex_2-spark.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_daily", + "role": "Identifier" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_daily", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "res4", + "domain": "boolean" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_daily", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_2/timeshift_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_2/timeshift_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/ex_2.json new file mode 100644 index 000000000..cd28ebffb --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/ex_2.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_daily", + "role": "Identifier" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "id_daily", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "res4", + "domain": "boolean" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_daily", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/ex_2.vtl new file mode 100644 index 000000000..f5e843597 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= timeshift(in_2, -2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_1/stock_daily_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_1/stock_daily_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_2/stock_daily_test.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_2/stock_daily_test.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/07 Time operators/timeshift_1/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/intersection/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/intersection/ex_1-spark.json new file mode 100644 index 000000000..20b81fa27 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/intersection/ex_1-spark.json @@ -0,0 +1,146 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_1", + "structure": "ex_1_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_1_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "edf2", + "role": "Measure" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + }, + { + "name": "edf3", + "role": "Measure" + }, + { + "name": "quality_status", + "role": "Attribute" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "edf2", + "role": "Measure" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + }, + { + "name": "edf3", + "role": "Measure" + }, + { + "name": "quality_status", + "role": "Attribute" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "edf2", + "role": "Measure" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + }, + { + "name": "edf3", + "role": "Measure" + }, + { + "name": "quality_status", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "quality_status", + "domain": "string" + }, + { + "name": "edfdate", + "domain": "date" + }, + { + "name": "edf2", + "domain": "number" + }, + { + "name": "edf3", + "domain": "number" + }, + { + "name": "edf1", + "domain": "number" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "mkmvid", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/intersection/intersection.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/intersection/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/intersection/intersection.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/intersection/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/intersection/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/intersection/ex_1.json new file mode 100644 index 000000000..a2d237dec --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/intersection/ex_1.json @@ -0,0 +1,146 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_1", + "structure": "ex_1_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_1_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "edf2", + "role": "Measure" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + }, + { + "name": "edf3", + "role": "Measure" + }, + { + "name": "quality_status", + "role": "Attribute" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "edf2", + "role": "Measure" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + }, + { + "name": "edf3", + "role": "Measure" + }, + { + "name": "quality_status", + "role": "Attribute" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "edf2", + "role": "Measure" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + }, + { + "name": "edf3", + "role": "Measure" + }, + { + "name": "quality_status", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "quality_status", + "domain": "string" + }, + { + "name": "edfdate", + "domain": "date" + }, + { + "name": "edf2", + "domain": "number" + }, + { + "name": "edf3", + "domain": "number" + }, + { + "name": "edf1", + "domain": "number" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "mkmvid", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/intersection/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/intersection/ex_1.vtl new file mode 100644 index 000000000..ae7b12f37 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/intersection/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= intersect(in_1, in_2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/intersection/intersection_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/intersection/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/intersection/intersection_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/intersection/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/intersection/intersection_test2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/intersection/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/intersection/intersection_test2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/intersection/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/setdiff/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/setdiff/ex_1-spark.json new file mode 100644 index 000000000..c291d2130 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/setdiff/ex_1-spark.json @@ -0,0 +1,146 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "edf2", + "role": "Measure" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + }, + { + "name": "edf3", + "role": "Measure" + }, + { + "name": "quality_status", + "role": "Attribute" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "edf2", + "role": "Measure" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + }, + { + "name": "edf3", + "role": "Measure" + }, + { + "name": "quality_status", + "role": "Attribute" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "edf2", + "role": "Measure" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + }, + { + "name": "edf3", + "role": "Measure" + }, + { + "name": "quality_status", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "quality_status", + "domain": "string" + }, + { + "name": "edfdate", + "domain": "date" + }, + { + "name": "edf2", + "domain": "number" + }, + { + "name": "edf3", + "domain": "number" + }, + { + "name": "edf1", + "domain": "number" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "mkmvid", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/set_difference_1/set_difference_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/setdiff/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/set_difference_1/set_difference_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/setdiff/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/setdiff/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/setdiff/ex_1.json new file mode 100644 index 000000000..4f947ab5d --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/setdiff/ex_1.json @@ -0,0 +1,146 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "edf2", + "role": "Measure" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + }, + { + "name": "edf3", + "role": "Measure" + }, + { + "name": "quality_status", + "role": "Attribute" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "edf2", + "role": "Measure" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + }, + { + "name": "edf3", + "role": "Measure" + }, + { + "name": "quality_status", + "role": "Attribute" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "edf2", + "role": "Measure" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + }, + { + "name": "edf3", + "role": "Measure" + }, + { + "name": "quality_status", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "quality_status", + "domain": "string" + }, + { + "name": "edfdate", + "domain": "date" + }, + { + "name": "edf2", + "domain": "number" + }, + { + "name": "edf3", + "domain": "number" + }, + { + "name": "edf1", + "domain": "number" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "mkmvid", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/setdiff/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/setdiff/ex_1.vtl new file mode 100644 index 000000000..a81b6f1bb --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/setdiff/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= setdiff(in_1,in_2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/set_difference_1/intersection_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/setdiff/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/set_difference_1/intersection_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/setdiff/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/set_difference_1/intersection_test2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/setdiff/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/set_difference_1/intersection_test2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/setdiff/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/symdiff/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/symdiff/ex_1-spark.json new file mode 100644 index 000000000..cea9f63d1 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/symdiff/ex_1-spark.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "ex_1_str" + }, + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "ex_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "edf2", + "role": "Measure" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + }, + { + "name": "edf3", + "role": "Measure" + }, + { + "name": "quality_status", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "quality_status", + "domain": "string" + }, + { + "name": "edfdate", + "domain": "date" + }, + { + "name": "edf2", + "domain": "number" + }, + { + "name": "edf3", + "domain": "number" + }, + { + "name": "edf1", + "domain": "number" + }, + { + "name": "mkmvid", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/symmetric_difference_1/symmetric_difference_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/symdiff/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/symmetric_difference_1/symmetric_difference_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/symdiff/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/symdiff/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/symdiff/ex_1.json new file mode 100644 index 000000000..317712d6c --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/symdiff/ex_1.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "ex_1_str" + }, + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "ex_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "edf2", + "role": "Measure" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + }, + { + "name": "edf3", + "role": "Measure" + }, + { + "name": "quality_status", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "quality_status", + "domain": "string" + }, + { + "name": "edfdate", + "domain": "date" + }, + { + "name": "edf2", + "domain": "number" + }, + { + "name": "edf3", + "domain": "number" + }, + { + "name": "edf1", + "domain": "number" + }, + { + "name": "mkmvid", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/symdiff/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/symdiff/ex_1.vtl new file mode 100644 index 000000000..494116ec6 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/symdiff/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= symdiff(in_1,in_2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/symmetric_difference_1/intersection_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/symdiff/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/symmetric_difference_1/intersection_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/symdiff/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/symmetric_difference_1/intersection_test2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/symdiff/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/symmetric_difference_1/intersection_test2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/symdiff/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/ex_1-spark.json new file mode 100644 index 000000000..0008d9b82 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/ex_1-spark.json @@ -0,0 +1,110 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "num_2", + "domain": "number" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_1/union_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_1/union_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/ex_1.json new file mode 100644 index 000000000..1f1cf55a5 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/ex_1.json @@ -0,0 +1,110 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "num_2", + "domain": "number" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "num_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/ex_1.vtl new file mode 100644 index 000000000..44d6e3c8a --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= union(in_1, in_2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/ex_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/ex_3-spark.json new file mode 100644 index 000000000..01bfea980 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/ex_3-spark.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "spark:csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "date" + }, + { + "name": "num_2", + "domain": "number" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "num_1", + "domain": "integer" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_2/union_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/ex_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_2/union_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/ex_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/ex_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/ex_3.json new file mode 100644 index 000000000..5967754c6 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/ex_3.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "num_2", + "role": "Measure" + }, + { + "name": "num_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "date" + }, + { + "name": "num_2", + "domain": "number" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "num_1", + "domain": "integer" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/ex_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/ex_3.vtl new file mode 100644 index 000000000..6c625a1eb --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/ex_3.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := union(in_3[filter num_1<=2][calc num_1 := -999], in_3[filter num_1>2]); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_1/union_test_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_1/union_test_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_1/union_test_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_1/union_test_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_2/union_test_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_2/union_test_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/08 Set operators/union/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/average/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/average/ex_1-spark.json new file mode 100644 index 000000000..61168a9a1 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/average/ex_1-spark.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "median_data", + "source": "spark:csv:in_1.csv", + "structure": "median_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "median_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/average/average.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/average/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/average/average.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/average/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/average/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/average/ex_1.json new file mode 100644 index 000000000..d9bb26b9e --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/average/ex_1.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "median_data", + "source": "csv:in_1.csv", + "structure": "median_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "median_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/average/average.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/average/ex_1.vtl similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/average/average.vtl rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/average/ex_1.vtl diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/average/median_variance.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/average/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/average/median_variance.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/average/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/count/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/count/ex_1-spark.json new file mode 100644 index 000000000..b76f4b26d --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/count/ex_1-spark.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "integer_var", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "integer_var", + "domain": "integer" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/count/count.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/count/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/count/count.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/count/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/count/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/count/ex_1.json new file mode 100644 index 000000000..99de42829 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/count/ex_1.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "integer_var", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "integer_var", + "domain": "integer" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/count/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/count/ex_1.vtl new file mode 100644 index 000000000..d67648b35 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/count/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= count(in_1 group by Id_1, Id_2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/count/ratiotoreport.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/count/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/count/ratiotoreport.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/count/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/ex_1-spark.json new file mode 100644 index 000000000..6c90ad58d --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/ex_1-spark.json @@ -0,0 +1,96 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_1/first_value_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_1/first_value_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/ex_1.json new file mode 100644 index 000000000..9148005e1 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/ex_1.json @@ -0,0 +1,96 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/ex_1.vtl new file mode 100644 index 000000000..ff2fb2d96 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= first_value(in_1 over (partition by Id_1, Id_2 order by Id_3 data points between 1 preceding and 1 following)); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/ex_2-spark.json new file mode 100644 index 000000000..cf924fa76 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/ex_2-spark.json @@ -0,0 +1,108 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "me_3", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_3", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_2/first_value_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_2/first_value_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/ex_2.json new file mode 100644 index 000000000..119ac64f2 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/ex_2.json @@ -0,0 +1,108 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "me_3", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_3", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/ex_2.vtl new file mode 100644 index 000000000..79485ad23 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_2[calc Me_3 := first_value(Me_1 over (partition by Id_1, Id_2 order by Id_3))]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_1/ratiotoreport.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_1/ratiotoreport.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_2/ratiotoreport.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_2/ratiotoreport.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/first_value/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/ex_1-spark.json new file mode 100644 index 000000000..18ba4cb68 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/ex_1-spark.json @@ -0,0 +1,68 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "edfdate", + "domain": "date" + }, + { + "name": "edf1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "mkmvid", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_1/lag_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_1/lag_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/ex_1.json new file mode 100644 index 000000000..a162ce673 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/ex_1.json @@ -0,0 +1,68 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "edfdate", + "domain": "date" + }, + { + "name": "edf1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "mkmvid", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/ex_1.vtl new file mode 100644 index 000000000..bbbbe62cd --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= lag(in_1, 2 over (partition by mkmvid order by edfdate)); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/ex_2-spark.json new file mode 100644 index 000000000..5b6f7ceee --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/ex_2-spark.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + }, + { + "name": "previous", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "previous", + "domain": "number" + }, + { + "name": "edfdate", + "domain": "date" + }, + { + "name": "edf1", + "domain": "number" + }, + { + "name": "mkmvid", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_2/lag_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_2/lag_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/ex_2.json new file mode 100644 index 000000000..499ef7050 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/ex_2.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + }, + { + "name": "previous", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "previous", + "domain": "number" + }, + { + "name": "edfdate", + "domain": "date" + }, + { + "name": "edf1", + "domain": "number" + }, + { + "name": "mkmvid", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/ex_2.vtl new file mode 100644 index 000000000..91032b65a --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_2[calc previous := lag(edf1, 1 over (partition by mkmvid order by edfdate))]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_1/lag.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_1/lag.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_2/lag.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_2/lag.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lag/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/ex_1-spark.json new file mode 100644 index 000000000..6c90ad58d --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/ex_1-spark.json @@ -0,0 +1,96 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_1/last_value_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_1/last_value_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/ex_1.json new file mode 100644 index 000000000..9148005e1 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/ex_1.json @@ -0,0 +1,96 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/ex_1.vtl new file mode 100644 index 000000000..97715cba3 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= last_value(in_1 over (partition by Id_1, Id_2 order by Id_3 data points between 1 preceding and 1 following)); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/ex_2-spark.json new file mode 100644 index 000000000..cf924fa76 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/ex_2-spark.json @@ -0,0 +1,108 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "me_3", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_3", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_2/last_value_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_2/last_value_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/ex_2.json new file mode 100644 index 000000000..119ac64f2 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/ex_2.json @@ -0,0 +1,108 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "me_3", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_3", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/ex_2.vtl new file mode 100644 index 000000000..913409eb8 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_2[calc Me_3 := last_value(Me_1 over (partition by Id_1, Id_2 order by Id_3))]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_1/ratiotoreport.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_1/ratiotoreport.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_2/ratiotoreport.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_2/ratiotoreport.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/last_value/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/ex_1-spark.json new file mode 100644 index 000000000..15d866bcf --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/ex_1-spark.json @@ -0,0 +1,68 @@ +{ + "datasets": [ + { + "name": "in_1_data", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "edfdate", + "domain": "date" + }, + { + "name": "edf1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "mkmvid", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_1/lead_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_1/lead_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/ex_1.json new file mode 100644 index 000000000..4380a4fb7 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/ex_1.json @@ -0,0 +1,68 @@ +{ + "datasets": [ + { + "name": "in_1_data", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "edfdate", + "domain": "date" + }, + { + "name": "edf1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "mkmvid", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/ex_1.vtl new file mode 100644 index 000000000..bbd662c63 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= lead(in_1_data, 1 over (partition by mkmvid order by edfdate)); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/ex_2-spark.json new file mode 100644 index 000000000..eef9920df --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/ex_2-spark.json @@ -0,0 +1,80 @@ +{ + "datasets": [ + { + "name": "in_2_data", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "next", + "role": "Measure" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "next", + "domain": "number" + }, + { + "name": "edfdate", + "domain": "date" + }, + { + "name": "edf1", + "domain": "number" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "mkmvid", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_2/lead_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_2/lead_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/ex_2.json new file mode 100644 index 000000000..2ee555c60 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/ex_2.json @@ -0,0 +1,80 @@ +{ + "datasets": [ + { + "name": "in_2_data", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "edfdate", + "role": "Identifier" + }, + { + "name": "next", + "role": "Measure" + }, + { + "name": "mkmvid", + "role": "Identifier" + }, + { + "name": "edf1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "next", + "domain": "number" + }, + { + "name": "edfdate", + "domain": "date" + }, + { + "name": "edf1", + "domain": "number" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "mkmvid", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/ex_2.vtl new file mode 100644 index 000000000..c39af7df2 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= fill_time_series(in_2_data, single)[calc next := lead(edf1, 1 over (partition by mkmvid order by edfdate))]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_1/lag.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_1/lag.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_2/lag.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_2/lag.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/lead/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/max/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/max/ex_1-spark.json new file mode 100644 index 000000000..2c9770e67 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/max/ex_1-spark.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/max/max.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/max/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/max/max.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/max/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/max/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/max/ex_1.json new file mode 100644 index 000000000..ceaab41a8 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/max/ex_1.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/max/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/max/ex_1.vtl new file mode 100644 index 000000000..34bc6ee70 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/max/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= max(in_1 group by Id_2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/max/ratiotoreport.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/max/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/max/ratiotoreport.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/max/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/median/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/median/ex_1-spark.json new file mode 100644 index 000000000..c9e6e0ad9 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/median/ex_1-spark.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "integer" + }, + { + "name": "me_1", + "domain": "integer" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/median/median.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/median/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/median/median.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/median/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/median/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/median/ex_1.json new file mode 100644 index 000000000..14fc110de --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/median/ex_1.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "integer" + }, + { + "name": "me_1", + "domain": "integer" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/median/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/median/ex_1.vtl new file mode 100644 index 000000000..2a4129028 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/median/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= median(in_1 group by Id_2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/median/median_variance.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/median/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/median/median_variance.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/median/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/min/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/min/ex_1-spark.json new file mode 100644 index 000000000..2c9770e67 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/min/ex_1-spark.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/min/min.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/min/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/min/min.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/min/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/min/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/min/ex_1.json new file mode 100644 index 000000000..ceaab41a8 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/min/ex_1.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/min/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/min/ex_1.vtl new file mode 100644 index 000000000..61303be02 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/min/ex_1.vtl @@ -0,0 +1,21 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +ds1:= in_1; +test_result:= min(in_1 group by Id_2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/min/ratiotoreport.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/min/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/min/ratiotoreport.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/min/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/rank/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/rank/ex_1-spark.json new file mode 100644 index 000000000..b86769e41 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/rank/ex_1-spark.json @@ -0,0 +1,96 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "me_3", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "me_3", + "domain": "integer" + }, + { + "name": "me_2", + "domain": "integer" + }, + { + "name": "me_1", + "domain": "integer" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rank_1/rank_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/rank/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rank_1/rank_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/rank/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/rank/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/rank/ex_1.json new file mode 100644 index 000000000..75ee72916 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/rank/ex_1.json @@ -0,0 +1,104 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "me_3", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_3", + "domain": "integer" + }, + { + "name": "me_2", + "domain": "integer" + }, + { + "name": "me_1", + "domain": "integer" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/rank/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/rank/ex_1.vtl new file mode 100644 index 000000000..6651f1239 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/rank/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_1[calc Me_3 := rank( over (partition by Id_1 , Id_2 order by Me_1))]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rank_1/rank.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/rank/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rank_1/rank.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/rank/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/ex_1-spark.json new file mode 100644 index 000000000..6c90ad58d --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/ex_1-spark.json @@ -0,0 +1,96 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_1/ratio_to_report_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_1/ratio_to_report_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/ex_1.json new file mode 100644 index 000000000..9148005e1 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/ex_1.json @@ -0,0 +1,96 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/ex_1.vtl new file mode 100644 index 000000000..b21a68b76 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= round(ratio_to_report(in_1 over (partition by Id_1, Id_2)), 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/ex_2-spark.json new file mode 100644 index 000000000..cf924fa76 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/ex_2-spark.json @@ -0,0 +1,108 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "me_3", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_3", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_2/ratio_to_report_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_2/ratio_to_report_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/ex_2.json new file mode 100644 index 000000000..119ac64f2 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/ex_2.json @@ -0,0 +1,108 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "me_3", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_3", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/ex_2.vtl new file mode 100644 index 000000000..8de255bc5 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= round(in_2[calc Me_3 := ratio_to_report(Me_1 over (partition by Id_1, Id_2))], 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_1/ratiotoreport.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_1/ratiotoreport.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_2/ratiotoreport.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_2/ratiotoreport.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/ratio_to_report/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_pop/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_pop/ex_1-spark.json new file mode 100644 index 000000000..d5be93bb0 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_pop/ex_1-spark.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "median_data", + "source": "spark:csv:in_1.csv", + "structure": "median_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "median_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_pop/standard_deviation_pop.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_pop/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_pop/standard_deviation_pop.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_pop/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_pop/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_pop/ex_1.json new file mode 100644 index 000000000..78e3a2755 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_pop/ex_1.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "median_data", + "source": "csv:in_1.csv", + "structure": "median_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "median_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_pop/standard_deviation_pop.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_pop/ex_1.vtl similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_pop/standard_deviation_pop.vtl rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_pop/ex_1.vtl diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_pop/median_variance.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_pop/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_pop/median_variance.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_pop/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_samp/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_samp/ex_1-spark.json new file mode 100644 index 000000000..6d98b10de --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_samp/ex_1-spark.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_samp/standard_deviation_samp.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_samp/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_samp/standard_deviation_samp.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_samp/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_samp/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_samp/ex_1.json new file mode 100644 index 000000000..45bd7bff6 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_samp/ex_1.json @@ -0,0 +1,72 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_samp/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_samp/ex_1.vtl new file mode 100644 index 000000000..af73a32cc --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_samp/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= round(stddev_samp(in_1 group by Id_2), 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_samp/stdev.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_samp/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_samp/stdev.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/stddev_samp/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/ex_1-spark.json new file mode 100644 index 000000000..2a9a8db81 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/ex_1-spark.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "id2", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id2", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "m2", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "id2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum/sum.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum/sum.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/ex_1.json new file mode 100644 index 000000000..65c0a0b93 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/ex_1.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "id2", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id2", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "m2", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "id2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/ex_1.vtl new file mode 100644 index 000000000..00cac459b --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := sum(in_1 group by id2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/ex_2-spark.json new file mode 100644 index 000000000..7cb262395 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/ex_2-spark.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "median_data", + "source": "spark:csv:in_2.csv", + "structure": "median_str" + }, + { + "name": "ex_2", + "structure": "sum_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "median_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "sum_str", + "components": [ + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum_1/sum_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum_1/sum_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/ex_2.json new file mode 100644 index 000000000..c59d0f2c4 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/ex_2.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "median_data", + "source": "csv:in_2.csv", + "structure": "median_str" + }, + { + "name": "ex_2", + "structure": "sum_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "median_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "sum_str", + "components": [ + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum_1/sum_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/ex_2.vtl similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum_1/sum_1.vtl rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/ex_2.vtl diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr/number_test5.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr/number_test5.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum_1/median_variance.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum_1/median_variance.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/sum/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_pop/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_pop/ex_1-spark.json new file mode 100644 index 000000000..d5be93bb0 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_pop/ex_1-spark.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "median_data", + "source": "spark:csv:in_1.csv", + "structure": "median_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "median_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_pop/var_pop.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_pop/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_pop/var_pop.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_pop/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_pop/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_pop/ex_1.json new file mode 100644 index 000000000..78e3a2755 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_pop/ex_1.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "median_data", + "source": "csv:in_1.csv", + "structure": "median_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "median_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_pop/var_pop.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_pop/ex_1.vtl similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_pop/var_pop.vtl rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_pop/ex_1.vtl diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_pop/median_variance.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_pop/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_pop/median_variance.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_pop/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_samp/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_samp/ex_1-spark.json new file mode 100644 index 000000000..d5be93bb0 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_samp/ex_1-spark.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "median_data", + "source": "spark:csv:in_1.csv", + "structure": "median_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "median_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_samp/var_samp.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_samp/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_samp/var_samp.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_samp/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_samp/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_samp/ex_1.json new file mode 100644 index 000000000..78e3a2755 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_samp/ex_1.json @@ -0,0 +1,88 @@ +{ + "datasets": [ + { + "name": "median_data", + "source": "csv:in_1.csv", + "structure": "median_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "median_str", + "components": [ + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "id_3", + "domain": "date" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_samp/var_samp.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_samp/ex_1.vtl similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_samp/var_samp.vtl rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_samp/ex_1.vtl diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_samp/median_variance.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_samp/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_samp/median_variance.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/10 Aggregate and Analytic operators/var_samp/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/ex_1-spark.json new file mode 100644 index 000000000..275878701 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/ex_1-spark.json @@ -0,0 +1,152 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_1", + "structure": "if_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "if_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_1/if-then-else_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_1/if-then-else_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/ex_1.json new file mode 100644 index 000000000..ae1f66a77 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/ex_1.json @@ -0,0 +1,152 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_1", + "structure": "if_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "if_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/ex_1.vtl new file mode 100644 index 000000000..344532b36 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= if (in_1#Id_4 = "F") then in_2 else in_3; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/ex_2-spark.json new file mode 100644 index 000000000..47c168552 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/ex_2-spark.json @@ -0,0 +1,96 @@ +{ + "datasets": [ + { + "name": "in_4", + "source": "spark:csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "ex_2", + "structure": "if_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "if_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "in_4_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_2/if-then-else_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_2/if-then-else_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/ex_2.json new file mode 100644 index 000000000..c02179fa4 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/ex_2.json @@ -0,0 +1,96 @@ +{ + "datasets": [ + { + "name": "in_4", + "source": "csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "ex_2", + "structure": "if_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "if_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "in_4_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/ex_2.vtl new file mode 100644 index 000000000..45646b51e --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_4[calc Me_2 := if (Id_4 = "F") then Me_1/1000 else 0]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_1/if_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_1/if_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_1/if_test2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_1/if_test2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_1/if_test3.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_1/if_test3.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_2/if_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/in_4.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_2/if_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/if-then-else/in_4.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_1-spark.json new file mode 100644 index 000000000..f3f771f8c --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_1-spark.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_1/nvl_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_1/nvl_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_1.json new file mode 100644 index 000000000..a899b1d74 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_1.json @@ -0,0 +1,92 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "integer" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_1.vtl new file mode 100644 index 000000000..1a7944b55 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := nvl(in_1, 0); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_2-spark.json new file mode 100644 index 000000000..f0b536ba6 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_2-spark.json @@ -0,0 +1,122 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_2/nvl_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_2/nvl_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_2.json new file mode 100644 index 000000000..a781e16c5 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_2.json @@ -0,0 +1,122 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_2.vtl new file mode 100644 index 000000000..8eb456e12 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := nvl(in_2, in_3); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_4-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_4-spark.json new file mode 100644 index 000000000..83dadad6a --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_4-spark.json @@ -0,0 +1,104 @@ +{ + "datasets": [ + { + "name": "in_4", + "source": "spark:csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "ex_4", + "structure": "ex_4_str", + "source": "spark:csv:ex_4.csv" + } + ], + "structures": [ + { + "name": "in_4_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_4_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "nullrepl", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "nullrepl", + "domain": "number" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_3/nvl_3.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_4.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_3/nvl_3.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_4.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_4.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_4.json new file mode 100644 index 000000000..4216f32df --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_4.json @@ -0,0 +1,104 @@ +{ + "datasets": [ + { + "name": "in_4", + "source": "csv:in_4.csv", + "structure": "in_4_str" + }, + { + "name": "ex_4", + "structure": "ex_4_str", + "source": "csv:ex_4.csv" + } + ], + "structures": [ + { + "name": "in_4_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + }, + { + "name": "ex_4_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id_3", + "role": "Identifier" + }, + { + "name": "id_4", + "role": "Identifier" + }, + { + "name": "id_2", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "nullrepl", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "id_2", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "nullrepl", + "domain": "number" + }, + { + "name": "id_3", + "domain": "string" + }, + { + "name": "id_4", + "domain": "string" + }, + { + "name": "id_1", + "domain": "number" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_4.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_4.vtl new file mode 100644 index 000000000..d9f8b1d77 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/ex_4.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_4[calc nullRepl:= nvl(Me_1,-999)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_1/nvl_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_1/nvl_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_2/nvl_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_2/nvl_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_2/nvl_test2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_2/nvl_test2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_3/nvl_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/in_4.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_3/nvl_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/12 Conditional operators/nvl/in_4.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_1-spark.json new file mode 100644 index 000000000..9783f7283 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_1-spark.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "clauses_ex_1_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "id2", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + }, + { + "name": "clauses_ex_1_1_str", + "components": [ + { + "name": "id2", + "role": "Identifier" + }, + { + "name": "m2", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "m2", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "id2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr/aggr.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr/aggr.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_1.json new file mode 100644 index 000000000..3e2c115b6 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_1.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "id2", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id2", + "role": "Identifier" + }, + { + "name": "m2", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "m2", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "id2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_1.vtl new file mode 100644 index 000000000..17c768401 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_1[aggr m2 := sum(m1) group by id2]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_2-spark.json new file mode 100644 index 000000000..6409d9e93 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_2-spark.json @@ -0,0 +1,184 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "unit", + "domain": "string" + }, + { + "name": "decimals", + "domain": "string" + }, + { + "name": "currency_denom", + "domain": "string" + }, + { + "name": "source_agency", + "domain": "string" + }, + { + "name": "exr_suffix", + "domain": "string" + }, + { + "name": "collection", + "domain": "string" + }, + { + "name": "title", + "domain": "string" + }, + { + "name": "freq", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id", + "domain": "string" + }, + { + "name": "exr_type", + "domain": "string" + }, + { + "name": "time_format", + "domain": "string" + }, + { + "name": "obs_status", + "domain": "string" + }, + { + "name": "year", + "domain": "number" + }, + { + "name": "unit_mult", + "domain": "string" + }, + { + "name": "currency", + "domain": "string" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_1/aggr_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_1/aggr_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_2.json new file mode 100644 index 000000000..0fbfaa0bd --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_2.json @@ -0,0 +1,184 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "in_2_str", + "components": [ + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + }, + { + "name": "ex_2_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + } + ] + } + ], + "variables": [ + { + "name": "unit", + "domain": "string" + }, + { + "name": "decimals", + "domain": "string" + }, + { + "name": "currency_denom", + "domain": "string" + }, + { + "name": "source_agency", + "domain": "string" + }, + { + "name": "exr_suffix", + "domain": "string" + }, + { + "name": "collection", + "domain": "string" + }, + { + "name": "title", + "domain": "string" + }, + { + "name": "freq", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id", + "domain": "string" + }, + { + "name": "exr_type", + "domain": "string" + }, + { + "name": "time_format", + "domain": "string" + }, + { + "name": "obs_status", + "domain": "string" + }, + { + "name": "year", + "domain": "number" + }, + { + "name": "unit_mult", + "domain": "string" + }, + { + "name": "currency", + "domain": "string" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_2.vtl new file mode 100644 index 000000000..6db232ba1 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_2[aggr Me_1 := min ( Me_1 ) group by Id_1 ]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_3-spark.json new file mode 100644 index 000000000..0eee36522 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_3-spark.json @@ -0,0 +1,184 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "spark:csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "unit", + "domain": "string" + }, + { + "name": "decimals", + "domain": "string" + }, + { + "name": "currency_denom", + "domain": "string" + }, + { + "name": "source_agency", + "domain": "string" + }, + { + "name": "exr_suffix", + "domain": "string" + }, + { + "name": "collection", + "domain": "string" + }, + { + "name": "title", + "domain": "string" + }, + { + "name": "freq", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id", + "domain": "string" + }, + { + "name": "exr_type", + "domain": "string" + }, + { + "name": "time_format", + "domain": "string" + }, + { + "name": "obs_status", + "domain": "string" + }, + { + "name": "year", + "domain": "number" + }, + { + "name": "unit_mult", + "domain": "string" + }, + { + "name": "currency", + "domain": "string" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_2/aggr_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_2/aggr_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_3.json new file mode 100644 index 000000000..e75890cc3 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_3.json @@ -0,0 +1,184 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_2", + "role": "Measure" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "unit", + "domain": "string" + }, + { + "name": "decimals", + "domain": "string" + }, + { + "name": "currency_denom", + "domain": "string" + }, + { + "name": "source_agency", + "domain": "string" + }, + { + "name": "exr_suffix", + "domain": "string" + }, + { + "name": "collection", + "domain": "string" + }, + { + "name": "title", + "domain": "string" + }, + { + "name": "freq", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id", + "domain": "string" + }, + { + "name": "exr_type", + "domain": "string" + }, + { + "name": "time_format", + "domain": "string" + }, + { + "name": "obs_status", + "domain": "string" + }, + { + "name": "year", + "domain": "number" + }, + { + "name": "unit_mult", + "domain": "string" + }, + { + "name": "currency", + "domain": "string" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_3.vtl new file mode 100644 index 000000000..a09561c44 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/ex_3.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_3[aggr Me_2 := min ( Me_2 ) group except Year]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub/number_test5.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub/number_test5.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_1/ecbexrusd_vtl.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_1/ecbexrusd_vtl.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_2/ecbexrusd_vtl.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_2/ecbexrusd_vtl.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/aggr/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/ex_1-spark.json new file mode 100644 index 000000000..db4285f96 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/ex_1-spark.json @@ -0,0 +1,51 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "in_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc/calc.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc/calc.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/ex_1.json new file mode 100644 index 000000000..07667baaa --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/ex_1.json @@ -0,0 +1,51 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "in_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/ex_1.vtl new file mode 100644 index 000000000..a0c58faa2 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_1[calc m1 := m1 + m1]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/ex_2-spark.json new file mode 100644 index 000000000..56877adb4 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/ex_2-spark.json @@ -0,0 +1,252 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "me_sum", + "role": "Measure" + }, + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "unit", + "domain": "string" + }, + { + "name": "decimals", + "domain": "string" + }, + { + "name": "currency_denom", + "domain": "string" + }, + { + "name": "source_agency", + "domain": "string" + }, + { + "name": "exr_suffix", + "domain": "string" + }, + { + "name": "collection", + "domain": "string" + }, + { + "name": "title", + "domain": "string" + }, + { + "name": "freq", + "domain": "string" + }, + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id", + "domain": "string" + }, + { + "name": "exr_type", + "domain": "string" + }, + { + "name": "time_format", + "domain": "string" + }, + { + "name": "obs_status", + "domain": "string" + }, + { + "name": "year", + "domain": "integer" + }, + { + "name": "unit_mult", + "domain": "string" + }, + { + "name": "currency", + "domain": "string" + }, + { + "name": "me_2", + "domain": "integer" + }, + { + "name": "me_sum", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc_1/calc_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc_1/calc_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/ex_2.json new file mode 100644 index 000000000..baf923f36 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/ex_2.json @@ -0,0 +1,252 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "me_sum", + "role": "Measure" + }, + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "unit", + "domain": "string" + }, + { + "name": "decimals", + "domain": "string" + }, + { + "name": "currency_denom", + "domain": "string" + }, + { + "name": "source_agency", + "domain": "string" + }, + { + "name": "exr_suffix", + "domain": "string" + }, + { + "name": "collection", + "domain": "string" + }, + { + "name": "title", + "domain": "string" + }, + { + "name": "freq", + "domain": "string" + }, + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id", + "domain": "string" + }, + { + "name": "exr_type", + "domain": "string" + }, + { + "name": "time_format", + "domain": "string" + }, + { + "name": "obs_status", + "domain": "string" + }, + { + "name": "year", + "domain": "integer" + }, + { + "name": "unit_mult", + "domain": "string" + }, + { + "name": "currency", + "domain": "string" + }, + { + "name": "me_2", + "domain": "integer" + }, + { + "name": "me_sum", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/ex_2.vtl new file mode 100644 index 000000000..0434d741c --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_2[calc Me_sum := Me_1 + Me_2]; \ No newline at end of file diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt/number_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt/number_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc_1/ecbexrusd_vtl.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc_1/ecbexrusd_vtl.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/calc/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/drop/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/drop/ex_1-spark.json new file mode 100644 index 000000000..0460bbc2c --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/drop/ex_1-spark.json @@ -0,0 +1,84 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "clauses_ex_1_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "m2", + "role": "Measure" + }, + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "id2", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + }, + { + "name": "clauses_ex_1_1_str", + "components": [ + { + "name": "m2", + "role": "Measure" + }, + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "id2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "m2", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "id2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/drop/drop.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/drop/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/drop/drop.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/drop/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/drop/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/drop/ex_1.json new file mode 100644 index 000000000..aff0f84f9 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/drop/ex_1.json @@ -0,0 +1,84 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "clauses_ex_1_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "m2", + "role": "Measure" + }, + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "id2", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + }, + { + "name": "clauses_ex_1_1_str", + "components": [ + { + "name": "m2", + "role": "Measure" + }, + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "id2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "m2", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "id2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/drop/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/drop/ex_1.vtl new file mode 100644 index 000000000..486a5f464 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/drop/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_1[drop m1, att1]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/drop/number_test6.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/drop/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/drop/number_test6.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/drop/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_1-spark.json new file mode 100644 index 000000000..7b49e849b --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_1-spark.json @@ -0,0 +1,68 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "clauses_ex_1_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "clauses_ex_1_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "obs_agg", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "obs_agg", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter/filter.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter/filter.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_1.json new file mode 100644 index 000000000..6aab70f5d --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_1.json @@ -0,0 +1,68 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "clauses_ex_1_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "clauses_ex_1_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "obs_agg", + "role": "Measure" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "obs_agg", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_1.vtl new file mode 100644 index 000000000..a84949ff5 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_1[filter id1 <> "a" and m1 > 2 and att1 <> "att_d"][aggr obs_agg := sum(m1) group by id1]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_2-spark.json new file mode 100644 index 000000000..3bda05ef3 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_2-spark.json @@ -0,0 +1,252 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "unit", + "domain": "string" + }, + { + "name": "decimals", + "domain": "string" + }, + { + "name": "currency_denom", + "domain": "string" + }, + { + "name": "source_agency", + "domain": "string" + }, + { + "name": "exr_suffix", + "domain": "string" + }, + { + "name": "collection", + "domain": "string" + }, + { + "name": "title", + "domain": "string" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "freq", + "domain": "string" + }, + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id", + "domain": "string" + }, + { + "name": "exr_type", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "time_format", + "domain": "string" + }, + { + "name": "obs_status", + "domain": "string" + }, + { + "name": "year", + "domain": "number" + }, + { + "name": "unit_mult", + "domain": "string" + }, + { + "name": "currency", + "domain": "string" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_1/filter_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_1/filter_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_2.json new file mode 100644 index 000000000..9b2a7e343 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_2.json @@ -0,0 +1,252 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "ex_2_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "ex_2_str", + "components": [ + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "unit", + "domain": "string" + }, + { + "name": "decimals", + "domain": "string" + }, + { + "name": "currency_denom", + "domain": "string" + }, + { + "name": "source_agency", + "domain": "string" + }, + { + "name": "exr_suffix", + "domain": "string" + }, + { + "name": "collection", + "domain": "string" + }, + { + "name": "title", + "domain": "string" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "freq", + "domain": "string" + }, + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id", + "domain": "string" + }, + { + "name": "exr_type", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "time_format", + "domain": "string" + }, + { + "name": "obs_status", + "domain": "string" + }, + { + "name": "year", + "domain": "number" + }, + { + "name": "unit_mult", + "domain": "string" + }, + { + "name": "currency", + "domain": "string" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_2.vtl new file mode 100644 index 000000000..85cb0db1b --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_2[ filter Me_2 > 50 ]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_3-spark.json new file mode 100644 index 000000000..ac0d9d933 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_3-spark.json @@ -0,0 +1,252 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "spark:csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "spark:csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "unit", + "domain": "string" + }, + { + "name": "decimals", + "domain": "string" + }, + { + "name": "currency_denom", + "domain": "string" + }, + { + "name": "source_agency", + "domain": "string" + }, + { + "name": "exr_suffix", + "domain": "string" + }, + { + "name": "collection", + "domain": "string" + }, + { + "name": "title", + "domain": "string" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "freq", + "domain": "string" + }, + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id", + "domain": "string" + }, + { + "name": "exr_type", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "time_format", + "domain": "string" + }, + { + "name": "obs_status", + "domain": "string" + }, + { + "name": "year", + "domain": "number" + }, + { + "name": "unit_mult", + "domain": "string" + }, + { + "name": "currency", + "domain": "string" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_2/filter_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_2/filter_2.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_3.json new file mode 100644 index 000000000..9d99e7841 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_3.json @@ -0,0 +1,252 @@ +{ + "datasets": [ + { + "name": "in_3", + "source": "csv:in_3.csv", + "structure": "in_3_str" + }, + { + "name": "ex_3", + "structure": "ex_3_str", + "source": "csv:ex_3.csv" + } + ], + "structures": [ + { + "name": "ex_3_str", + "components": [ + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + }, + { + "name": "in_3_str", + "components": [ + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "unit", + "domain": "string" + }, + { + "name": "decimals", + "domain": "string" + }, + { + "name": "currency_denom", + "domain": "string" + }, + { + "name": "source_agency", + "domain": "string" + }, + { + "name": "exr_suffix", + "domain": "string" + }, + { + "name": "collection", + "domain": "string" + }, + { + "name": "title", + "domain": "string" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "freq", + "domain": "string" + }, + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id", + "domain": "string" + }, + { + "name": "exr_type", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "time_format", + "domain": "string" + }, + { + "name": "obs_status", + "domain": "string" + }, + { + "name": "year", + "domain": "number" + }, + { + "name": "unit_mult", + "domain": "string" + }, + { + "name": "currency", + "domain": "string" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_3.vtl new file mode 100644 index 000000000..4f7ae866a --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/ex_3.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_3[ filter Me_1 + Me_2 <= 50 ]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uminus/number_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uminus/number_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_1/ecbexrusd_vtl.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_1/ecbexrusd_vtl.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_2/ecbexrusd_vtl.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/in_3.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_2/ecbexrusd_vtl.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/filter/in_3.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/ex_1-spark.json new file mode 100644 index 000000000..0460bbc2c --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/ex_1-spark.json @@ -0,0 +1,84 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "clauses_ex_1_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "m2", + "role": "Measure" + }, + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "id2", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + }, + { + "name": "clauses_ex_1_1_str", + "components": [ + { + "name": "m2", + "role": "Measure" + }, + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "id2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "m2", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "id2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep/keep.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep/keep.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/ex_1.json new file mode 100644 index 000000000..aff0f84f9 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/ex_1.json @@ -0,0 +1,84 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "clauses_ex_1_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "m2", + "role": "Measure" + }, + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "id2", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + }, + { + "name": "clauses_ex_1_1_str", + "components": [ + { + "name": "m2", + "role": "Measure" + }, + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "id2", + "role": "Identifier" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "m2", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "id2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/ex_1.vtl new file mode 100644 index 000000000..7a9eef6cb --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_1[keep m2]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/ex_2-spark.json new file mode 100644 index 000000000..72079fbe5 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/ex_2-spark.json @@ -0,0 +1,196 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "keep_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "keep_str", + "components": [ + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "year", + "role": "Identifier" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "unit", + "domain": "string" + }, + { + "name": "decimals", + "domain": "string" + }, + { + "name": "currency_denom", + "domain": "string" + }, + { + "name": "source_agency", + "domain": "string" + }, + { + "name": "exr_suffix", + "domain": "string" + }, + { + "name": "collection", + "domain": "string" + }, + { + "name": "title", + "domain": "string" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "freq", + "domain": "string" + }, + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id", + "domain": "string" + }, + { + "name": "exr_type", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "time_format", + "domain": "string" + }, + { + "name": "obs_status", + "domain": "string" + }, + { + "name": "year", + "domain": "number" + }, + { + "name": "unit_mult", + "domain": "string" + }, + { + "name": "currency", + "domain": "string" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep_1/keep_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep_1/keep_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/ex_2.json new file mode 100644 index 000000000..03f5beb7d --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/ex_2.json @@ -0,0 +1,196 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "keep_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "keep_str", + "components": [ + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "year", + "role": "Identifier" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "unit", + "domain": "string" + }, + { + "name": "decimals", + "domain": "string" + }, + { + "name": "currency_denom", + "domain": "string" + }, + { + "name": "source_agency", + "domain": "string" + }, + { + "name": "exr_suffix", + "domain": "string" + }, + { + "name": "collection", + "domain": "string" + }, + { + "name": "title", + "domain": "string" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "freq", + "domain": "string" + }, + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id", + "domain": "string" + }, + { + "name": "exr_type", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "time_format", + "domain": "string" + }, + { + "name": "obs_status", + "domain": "string" + }, + { + "name": "year", + "domain": "number" + }, + { + "name": "unit_mult", + "domain": "string" + }, + { + "name": "currency", + "domain": "string" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/ex_2.vtl new file mode 100644 index 000000000..10f9c3bcf --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_2[keep Me_1, FREQ]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep/number_test6.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep/number_test6.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep_1/ecbexrusd_vtl.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep_1/ecbexrusd_vtl.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/keep/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/ex_1-spark.json new file mode 100644 index 000000000..788a00f0a --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/ex_1-spark.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id2", + "role": "Identifier" + }, + { + "name": "m2", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "m2", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "id2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename/rename.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename/rename.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/ex_1.json new file mode 100644 index 000000000..650275086 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/ex_1.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "ex_1_str", + "components": [ + { + "name": "id2", + "role": "Identifier" + }, + { + "name": "m2", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + }, + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "m2", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "id2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/ex_1.vtl new file mode 100644 index 000000000..133ac26da --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_1[rename id1 to id2, m1 to m2]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/ex_2-spark.json new file mode 100644 index 000000000..dacd77cf7 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/ex_2-spark.json @@ -0,0 +1,284 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "rename_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "rename_str", + "components": [ + { + "name": "me_4", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "me_3", + "role": "Measure" + }, + { + "name": "me_6", + "role": "Measure" + }, + { + "name": "me_5", + "role": "Measure" + }, + { + "name": "me_7", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "source_agency", + "domain": "string" + }, + { + "name": "collection", + "domain": "string" + }, + { + "name": "id_1", + "domain": "string" + }, + { + "name": "res5", + "domain": "boolean" + }, + { + "name": "me_6", + "domain": "string" + }, + { + "name": "res4", + "domain": "boolean" + }, + { + "name": "me_7", + "domain": "string" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "time_format", + "domain": "string" + }, + { + "name": "me_3", + "domain": "string" + }, + { + "name": "obs_status", + "domain": "string" + }, + { + "name": "me_4", + "domain": "string" + }, + { + "name": "year", + "domain": "number" + }, + { + "name": "me_5", + "domain": "string" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + }, + { + "name": "unit", + "domain": "string" + }, + { + "name": "decimals", + "domain": "string" + }, + { + "name": "currency_denom", + "domain": "string" + }, + { + "name": "exr_suffix", + "domain": "string" + }, + { + "name": "title", + "domain": "string" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "freq", + "domain": "string" + }, + { + "name": "id", + "domain": "string" + }, + { + "name": "exr_type", + "domain": "string" + }, + { + "name": "unit_mult", + "domain": "string" + }, + { + "name": "currency", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename_1/rename_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename_1/rename_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/ex_2.json new file mode 100644 index 000000000..4acc2b1c5 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/ex_2.json @@ -0,0 +1,284 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "rename_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "rename_str", + "components": [ + { + "name": "me_4", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "me_3", + "role": "Measure" + }, + { + "name": "me_6", + "role": "Measure" + }, + { + "name": "me_5", + "role": "Measure" + }, + { + "name": "me_7", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "source_agency", + "domain": "string" + }, + { + "name": "collection", + "domain": "string" + }, + { + "name": "id_1", + "domain": "string" + }, + { + "name": "res5", + "domain": "boolean" + }, + { + "name": "me_6", + "domain": "string" + }, + { + "name": "res4", + "domain": "boolean" + }, + { + "name": "me_7", + "domain": "string" + }, + { + "name": "res3", + "domain": "boolean" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "time_format", + "domain": "string" + }, + { + "name": "me_3", + "domain": "string" + }, + { + "name": "obs_status", + "domain": "string" + }, + { + "name": "me_4", + "domain": "string" + }, + { + "name": "year", + "domain": "number" + }, + { + "name": "me_5", + "domain": "string" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + }, + { + "name": "unit", + "domain": "string" + }, + { + "name": "decimals", + "domain": "string" + }, + { + "name": "currency_denom", + "domain": "string" + }, + { + "name": "exr_suffix", + "domain": "string" + }, + { + "name": "title", + "domain": "string" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "freq", + "domain": "string" + }, + { + "name": "id", + "domain": "string" + }, + { + "name": "exr_type", + "domain": "string" + }, + { + "name": "unit_mult", + "domain": "string" + }, + { + "name": "currency", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/ex_2.vtl new file mode 100644 index 000000000..145c68f30 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_2[rename CURRENCY to Me_3, EXR_SUFFIX to Me_4, CURRENCY_DENOM to Me_5, FREQ to Me_6, EXR_TYPE to Me_7]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uplus/number_test1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uplus/number_test1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename_1/ecbexrusd_vtl.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename_1/ecbexrusd_vtl.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/rename/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/ex_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/ex_1-spark.json new file mode 100644 index 000000000..9c939fcac --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/ex_1-spark.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "spark:csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "spark:csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "id2", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "id2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub/sub.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/ex_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub/sub.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/ex_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/ex_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/ex_1.json new file mode 100644 index 000000000..0052436aa --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/ex_1.json @@ -0,0 +1,76 @@ +{ + "datasets": [ + { + "name": "in_1", + "source": "csv:in_1.csv", + "structure": "in_1_str" + }, + { + "name": "ex_1", + "structure": "ex_1_str", + "source": "csv:ex_1.csv" + } + ], + "structures": [ + { + "name": "in_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "id2", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + }, + { + "name": "ex_1_str", + "components": [ + { + "name": "id1", + "role": "Identifier" + }, + { + "name": "m1", + "role": "Measure" + }, + { + "name": "att1", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "m1", + "domain": "number" + }, + { + "name": "id1", + "domain": "string" + }, + { + "name": "att1", + "domain": "string" + }, + { + "name": "bool_var", + "domain": "boolean" + }, + { + "name": "id2", + "domain": "string" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/ex_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/ex_1.vtl new file mode 100644 index 000000000..bfa0d37a9 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/ex_1.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result := in_1[sub id2 = "c"]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/ex_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/ex_2-spark.json new file mode 100644 index 000000000..7a5407d14 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/ex_2-spark.json @@ -0,0 +1,248 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "spark:csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "sub_str", + "source": "spark:csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "sub_str", + "components": [ + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "unit", + "domain": "string" + }, + { + "name": "decimals", + "domain": "string" + }, + { + "name": "currency_denom", + "domain": "string" + }, + { + "name": "source_agency", + "domain": "string" + }, + { + "name": "exr_suffix", + "domain": "string" + }, + { + "name": "collection", + "domain": "string" + }, + { + "name": "title", + "domain": "string" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "freq", + "domain": "string" + }, + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id", + "domain": "string" + }, + { + "name": "exr_type", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "time_format", + "domain": "string" + }, + { + "name": "obs_status", + "domain": "string" + }, + { + "name": "year", + "domain": "number" + }, + { + "name": "unit_mult", + "domain": "string" + }, + { + "name": "currency", + "domain": "string" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub_1/sub_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/ex_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub_1/sub_1.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/ex_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/ex_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/ex_2.json new file mode 100644 index 000000000..0f058f1df --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/ex_2.json @@ -0,0 +1,248 @@ +{ + "datasets": [ + { + "name": "in_2", + "source": "csv:in_2.csv", + "structure": "in_2_str" + }, + { + "name": "ex_2", + "structure": "sub_str", + "source": "csv:ex_2.csv" + } + ], + "structures": [ + { + "name": "sub_str", + "components": [ + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + }, + { + "name": "in_2_str", + "components": [ + { + "name": "exr_suffix", + "role": "Measure" + }, + { + "name": "time_format", + "role": "Attribute" + }, + { + "name": "freq", + "role": "Measure" + }, + { + "name": "id_1", + "role": "Identifier" + }, + { + "name": "id", + "role": "Attribute" + }, + { + "name": "title", + "role": "Attribute" + }, + { + "name": "unit_mult", + "role": "Attribute" + }, + { + "name": "year", + "role": "Identifier" + }, + { + "name": "unit", + "role": "Attribute" + }, + { + "name": "currency", + "role": "Measure" + }, + { + "name": "currency_denom", + "role": "Measure" + }, + { + "name": "me_2", + "role": "Measure" + }, + { + "name": "source_agency", + "role": "Attribute" + }, + { + "name": "me_1", + "role": "Measure" + }, + { + "name": "exr_type", + "role": "Measure" + }, + { + "name": "decimals", + "role": "Attribute" + }, + { + "name": "collection", + "role": "Attribute" + }, + { + "name": "obs_status", + "role": "Attribute" + } + ] + } + ], + "variables": [ + { + "name": "unit", + "domain": "string" + }, + { + "name": "decimals", + "domain": "string" + }, + { + "name": "currency_denom", + "domain": "string" + }, + { + "name": "source_agency", + "domain": "string" + }, + { + "name": "exr_suffix", + "domain": "string" + }, + { + "name": "collection", + "domain": "string" + }, + { + "name": "title", + "domain": "string" + }, + { + "name": "res1", + "domain": "boolean" + }, + { + "name": "freq", + "domain": "string" + }, + { + "name": "id_1", + "domain": "string" + }, + { + "name": "id", + "domain": "string" + }, + { + "name": "exr_type", + "domain": "string" + }, + { + "name": "res2", + "domain": "boolean" + }, + { + "name": "time_format", + "domain": "string" + }, + { + "name": "obs_status", + "domain": "string" + }, + { + "name": "year", + "domain": "number" + }, + { + "name": "unit_mult", + "domain": "string" + }, + { + "name": "currency", + "domain": "string" + }, + { + "name": "me_2", + "domain": "number" + }, + { + "name": "me_1", + "domain": "number" + } + ] +} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/ex_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/ex_2.vtl new file mode 100644 index 000000000..f4188b887 --- /dev/null +++ b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/ex_2.vtl @@ -0,0 +1,20 @@ +/** + * Copyright © 2020 Banca D'Italia + * + * Licensed under the EUPL, Version 1.2 (the "License"); + * You may not use this work except in compliance with the + * License. + * You may obtain a copy of the License at: + * + * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt + * + * Unless required by applicable law or agreed to in + * writing, software distributed under the License is + * distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. + * + * See the License for the specific language governing + * permissions and limitations under the License. + */ +test_result:= in_2[sub Id_1="A"]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum/number_test5.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/in_1.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum/number_test5.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/in_1.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub_1/ecbexrusd_vtl.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/in_2.csv similarity index 100% rename from vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub_1/ecbexrusd_vtl.csv rename to vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/13 Clause operators/sub/in_2.csv diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/abs/abs-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/abs/abs-spark.json deleted file mode 100644 index 0791ed574..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/abs/abs-spark.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test3", - "source": "spark:csv:number_test3.csv", - "structure": "number_test3_str" - }, - { - "name": "expected", - "structure": "abs_str", - "source": "spark:csv:abs.csv" - } - ], - "structures": [ - { - "name": "number_test3_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "abs_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/abs/abs.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/abs/abs.json deleted file mode 100644 index 8c63fd252..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/abs/abs.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test3", - "source": "csv:number_test3.csv", - "structure": "number_test3_str" - }, - { - "name": "expected", - "structure": "abs_str", - "source": "csv:abs.csv" - } - ], - "structures": [ - { - "name": "number_test3_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "abs_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/abs/abs.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/abs/abs.vtl deleted file mode 100644 index 952c6732b..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/abs/abs.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := abs(number_test3); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_1/absolute_value_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_1/absolute_value_1-spark.json deleted file mode 100644 index b14581b72..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_1/absolute_value_1-spark.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "spark:csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "absolute_value_1_str", - "source": "spark:csv:absolute_value_1.csv" - } - ], - "structures": [ - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "absolute_value_1_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_1/absolute_value_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_1/absolute_value_1.json deleted file mode 100644 index dbe421164..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_1/absolute_value_1.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "absolute_value_1_str", - "source": "csv:absolute_value_1.csv" - } - ], - "structures": [ - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "absolute_value_1_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_1/absolute_value_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_1/absolute_value_1.vtl deleted file mode 100644 index 65db38862..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_1/absolute_value_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= abs(number_test7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_2/absolute_value_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_2/absolute_value_2-spark.json deleted file mode 100644 index 9596a4cb0..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_2/absolute_value_2-spark.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "spark:csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "absolute_value_2_str", - "source": "spark:csv:absolute_value_2.csv" - } - ], - "structures": [ - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "absolute_value_2_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "abs_3", - "role": "Measure" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "abs_3", - "domain": "number" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_2/absolute_value_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_2/absolute_value_2.json deleted file mode 100644 index a308592de..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_2/absolute_value_2.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "absolute_value_2_str", - "source": "csv:absolute_value_2.csv" - } - ], - "structures": [ - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "absolute_value_2_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "abs_3", - "role": "Measure" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "abs_3", - "domain": "number" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_2/absolute_value_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_2/absolute_value_2.vtl deleted file mode 100644 index 6fe2e1383..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/absolute_value_2/absolute_value_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= number_test7[calc Abs_3:= abs (Num_2)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr/aggr-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr/aggr-spark.json deleted file mode 100644 index 9dc19567e..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr/aggr-spark.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test5", - "source": "spark:csv:number_test5.csv", - "structure": "number_test5_str" - }, - { - "name": "expected", - "structure": "clauses_aggr_1_str", - "source": "spark:csv:aggr.csv" - } - ], - "structures": [ - { - "name": "number_test5_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "id2", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - }, - { - "name": "clauses_aggr_1_str", - "components": [ - { - "name": "id2", - "role": "Identifier" - }, - { - "name": "m2", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "m2", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "id2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr/aggr.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr/aggr.json deleted file mode 100644 index ced6a1f9c..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr/aggr.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test5", - "source": "csv:number_test5.csv", - "structure": "number_test5_str" - }, - { - "name": "expected", - "structure": "clauses_aggr_1_str", - "source": "csv:aggr.csv" - } - ], - "structures": [ - { - "name": "number_test5_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "id2", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - }, - { - "name": "clauses_aggr_1_str", - "components": [ - { - "name": "id2", - "role": "Identifier" - }, - { - "name": "m2", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "m2", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "id2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr/aggr.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr/aggr.vtl deleted file mode 100644 index fb18650cd..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr/aggr.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := number_test5[aggr m2 := sum(m1) group by id2]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_1/aggr_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_1/aggr_1-spark.json deleted file mode 100644 index 281068f92..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_1/aggr_1-spark.json +++ /dev/null @@ -1,184 +0,0 @@ -{ - "datasets": [ - { - "name": "ecbexrusd_vtl", - "source": "spark:csv:ecbexrusd_vtl.csv", - "structure": "ecbexrusd_vtl_str" - }, - { - "name": "expected", - "structure": "aggr_1_str", - "source": "spark:csv:aggr_1.csv" - } - ], - "structures": [ - { - "name": "ecbexrusd_vtl_str", - "components": [ - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - }, - { - "name": "aggr_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "unit", - "domain": "string" - }, - { - "name": "decimals", - "domain": "string" - }, - { - "name": "currency_denom", - "domain": "string" - }, - { - "name": "source_agency", - "domain": "string" - }, - { - "name": "exr_suffix", - "domain": "string" - }, - { - "name": "collection", - "domain": "string" - }, - { - "name": "title", - "domain": "string" - }, - { - "name": "freq", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id", - "domain": "string" - }, - { - "name": "exr_type", - "domain": "string" - }, - { - "name": "time_format", - "domain": "string" - }, - { - "name": "obs_status", - "domain": "string" - }, - { - "name": "year", - "domain": "number" - }, - { - "name": "unit_mult", - "domain": "string" - }, - { - "name": "currency", - "domain": "string" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_1/aggr_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_1/aggr_1.json deleted file mode 100644 index 55d9a8752..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_1/aggr_1.json +++ /dev/null @@ -1,184 +0,0 @@ -{ - "datasets": [ - { - "name": "ecbexrusd_vtl", - "source": "csv:ecbexrusd_vtl.csv", - "structure": "ecbexrusd_vtl_str" - }, - { - "name": "expected", - "structure": "aggr_1_str", - "source": "csv:aggr_1.csv" - } - ], - "structures": [ - { - "name": "ecbexrusd_vtl_str", - "components": [ - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - }, - { - "name": "aggr_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "unit", - "domain": "string" - }, - { - "name": "decimals", - "domain": "string" - }, - { - "name": "currency_denom", - "domain": "string" - }, - { - "name": "source_agency", - "domain": "string" - }, - { - "name": "exr_suffix", - "domain": "string" - }, - { - "name": "collection", - "domain": "string" - }, - { - "name": "title", - "domain": "string" - }, - { - "name": "freq", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id", - "domain": "string" - }, - { - "name": "exr_type", - "domain": "string" - }, - { - "name": "time_format", - "domain": "string" - }, - { - "name": "obs_status", - "domain": "string" - }, - { - "name": "year", - "domain": "number" - }, - { - "name": "unit_mult", - "domain": "string" - }, - { - "name": "currency", - "domain": "string" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_1/aggr_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_1/aggr_1.vtl deleted file mode 100644 index 092e0ac09..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_1/aggr_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= ecbexrusd_vtl[aggr Me_1 := min ( Me_1 ) group by Id_1 ]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_2/aggr_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_2/aggr_2-spark.json deleted file mode 100644 index d09643f70..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_2/aggr_2-spark.json +++ /dev/null @@ -1,184 +0,0 @@ -{ - "datasets": [ - { - "name": "ecbexrusd_vtl", - "source": "spark:csv:ecbexrusd_vtl.csv", - "structure": "ecbexrusd_vtl_str" - }, - { - "name": "expected", - "structure": "aggr_2_str", - "source": "spark:csv:aggr_2.csv" - } - ], - "structures": [ - { - "name": "aggr_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - } - ] - }, - { - "name": "ecbexrusd_vtl_str", - "components": [ - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "unit", - "domain": "string" - }, - { - "name": "decimals", - "domain": "string" - }, - { - "name": "currency_denom", - "domain": "string" - }, - { - "name": "source_agency", - "domain": "string" - }, - { - "name": "exr_suffix", - "domain": "string" - }, - { - "name": "collection", - "domain": "string" - }, - { - "name": "title", - "domain": "string" - }, - { - "name": "freq", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id", - "domain": "string" - }, - { - "name": "exr_type", - "domain": "string" - }, - { - "name": "time_format", - "domain": "string" - }, - { - "name": "obs_status", - "domain": "string" - }, - { - "name": "year", - "domain": "number" - }, - { - "name": "unit_mult", - "domain": "string" - }, - { - "name": "currency", - "domain": "string" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_2/aggr_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_2/aggr_2.json deleted file mode 100644 index dd65c9611..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_2/aggr_2.json +++ /dev/null @@ -1,184 +0,0 @@ -{ - "datasets": [ - { - "name": "ecbexrusd_vtl", - "source": "csv:ecbexrusd_vtl.csv", - "structure": "ecbexrusd_vtl_str" - }, - { - "name": "expected", - "structure": "aggr_2_str", - "source": "csv:aggr_2.csv" - } - ], - "structures": [ - { - "name": "aggr_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - } - ] - }, - { - "name": "ecbexrusd_vtl_str", - "components": [ - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "unit", - "domain": "string" - }, - { - "name": "decimals", - "domain": "string" - }, - { - "name": "currency_denom", - "domain": "string" - }, - { - "name": "source_agency", - "domain": "string" - }, - { - "name": "exr_suffix", - "domain": "string" - }, - { - "name": "collection", - "domain": "string" - }, - { - "name": "title", - "domain": "string" - }, - { - "name": "freq", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id", - "domain": "string" - }, - { - "name": "exr_type", - "domain": "string" - }, - { - "name": "time_format", - "domain": "string" - }, - { - "name": "obs_status", - "domain": "string" - }, - { - "name": "year", - "domain": "number" - }, - { - "name": "unit_mult", - "domain": "string" - }, - { - "name": "currency", - "domain": "string" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_2/aggr_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_2/aggr_2.vtl deleted file mode 100644 index bfbffd398..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/aggr_2/aggr_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= ecbexrusd_vtl[aggr Me_2 := min ( Me_2 ) group except Year]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_1/and_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_1/and_1-spark.json deleted file mode 100644 index 9bcfa166e..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_1/and_1-spark.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test5", - "source": "spark:csv:boolean_test5.csv", - "structure": "boolean_test5_str" - }, - { - "name": "boolean_test4", - "source": "spark:csv:boolean_test4.csv", - "structure": "boolean_test4_str" - }, - { - "name": "expected", - "structure": "and_1_str", - "source": "spark:csv:and_1.csv" - } - ], - "structures": [ - { - "name": "and_1_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - }, - { - "name": "boolean_test5_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - }, - { - "name": "boolean_test4_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "number" - }, - { - "name": "id_4", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_1/and_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_1/and_1.json deleted file mode 100644 index 05c1aa650..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_1/and_1.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test5", - "source": "csv:boolean_test5.csv", - "structure": "boolean_test5_str" - }, - { - "name": "boolean_test4", - "source": "csv:boolean_test4.csv", - "structure": "boolean_test4_str" - }, - { - "name": "expected", - "structure": "and_1_str", - "source": "csv:and_1.csv" - } - ], - "structures": [ - { - "name": "and_1_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - }, - { - "name": "boolean_test5_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - }, - { - "name": "boolean_test4_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "number" - }, - { - "name": "id_4", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_1/and_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_1/and_1.vtl deleted file mode 100644 index 0bac8a832..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_1/and_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= boolean_test4 and boolean_test5; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_2/and_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_2/and_2-spark.json deleted file mode 100644 index b48059e8f..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_2/and_2-spark.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test4", - "source": "spark:csv:boolean_test4.csv", - "structure": "boolean_test4_str" - }, - { - "name": "expected", - "structure": "and_2_str", - "source": "spark:csv:and_2.csv" - } - ], - "structures": [ - { - "name": "and_2_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "andt", - "role": "Measure" - }, - { - "name": "andf", - "role": "Measure" - } - ] - }, - { - "name": "boolean_test4_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "andt", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "andf", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "number" - }, - { - "name": "id_4", - "domain": "number" - }, - { - "name": "res1", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_2/and_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_2/and_2.json deleted file mode 100644 index 8de7cd408..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_2/and_2.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test4", - "source": "csv:boolean_test4.csv", - "structure": "boolean_test4_str" - }, - { - "name": "expected", - "structure": "and_2_str", - "source": "csv:and_2.csv" - } - ], - "structures": [ - { - "name": "and_2_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "andt", - "role": "Measure" - }, - { - "name": "andf", - "role": "Measure" - } - ] - }, - { - "name": "boolean_test4_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "andt", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "andf", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "number" - }, - { - "name": "id_4", - "domain": "number" - }, - { - "name": "res1", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_2/and_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_2/and_2.vtl deleted file mode 100644 index 2ca0a3dca..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_2/and_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= boolean_test4[calc andT:= Me_1 and true, andF:= Me_1 and false]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_or/and_or-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_or/and_or-spark.json deleted file mode 100644 index 837288287..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_or/and_or-spark.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test6", - "source": "spark:csv:boolean_test6.csv", - "structure": "boolean_test6_str" - }, - { - "name": "expected", - "structure": "and_or_str", - "source": "spark:csv:and_or.csv" - } - ], - "structures": [ - { - "name": "and_or_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_and", - "role": "Measure" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_or", - "role": "Measure" - } - ] - }, - { - "name": "boolean_test6_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "me_or", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_and", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "number" - }, - { - "name": "me_2", - "domain": "boolean" - }, - { - "name": "id_4", - "domain": "number" - }, - { - "name": "res1", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_or/and_or.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_or/and_or.csv deleted file mode 100644 index b29f9c418..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_or/and_or.csv +++ /dev/null @@ -1,7 +0,0 @@ -id_1,id_2,id_3,id_4,me_1,me_2,me_and,me_or -M,15,B,2013,FALSE,TRUE,FALSE,TRUE -M,64,B,2013,FALSE,FALSE,FALSE,FALSE -M,65,B,2013,FALSE,,FALSE, -F,15,U,2013,TRUE,TRUE,TRUE,TRUE -F,64,U,2013,TRUE,FALSE,FALSE,TRUE -F,65,U,2013,TRUE,,,TRUE diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_or/and_or.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_or/and_or.json deleted file mode 100644 index 4c5c1fcbe..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_or/and_or.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test6", - "source": "csv:boolean_test6.csv", - "structure": "boolean_test6_str" - }, - { - "name": "expected", - "structure": "and_or_str", - "source": "csv:and_or.csv" - } - ], - "structures": [ - { - "name": "and_or_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_and", - "role": "Measure" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_or", - "role": "Measure" - } - ] - }, - { - "name": "boolean_test6_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "me_or", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_and", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "number" - }, - { - "name": "me_2", - "domain": "boolean" - }, - { - "name": "id_4", - "domain": "number" - }, - { - "name": "res1", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_or/and_or.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_or/and_or.vtl deleted file mode 100644 index 992fcdcda..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_or/and_or.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= boolean_test6[calc Me_and:= Me_1 and Me_2, Me_or:= Me_1 or Me_2]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_or/boolean_test6.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_or/boolean_test6.csv deleted file mode 100644 index 222c45333..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/and_or/boolean_test6.csv +++ /dev/null @@ -1,7 +0,0 @@ -id_1,id_2,id_3,id_4,me_1,me_2 -M,15,B,2013,FALSE,TRUE -M,64,B,2013,FALSE,FALSE -M,65,B,2013,FALSE, -F,15,U,2013,TRUE,TRUE -F,64,U,2013,TRUE,FALSE -F,65,U,2013,TRUE, diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/average/average-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/average/average-spark.json deleted file mode 100644 index 90f718799..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/average/average-spark.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "median_data", - "source": "spark:csv:median_variance.csv", - "structure": "median_str" - }, - { - "name": "expected", - "structure": "average_str", - "source": "spark:csv:average.csv" - } - ], - "structures": [ - { - "name": "average_str", - "components": [ - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "median_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/average/average.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/average/average.json deleted file mode 100644 index 81bd3a284..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/average/average.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "median_data", - "source": "csv:median_variance.csv", - "structure": "median_str" - }, - { - "name": "expected", - "structure": "average_str", - "source": "csv:average.csv" - } - ], - "structures": [ - { - "name": "average_str", - "components": [ - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "median_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_1/basic_arithmetic_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_1/basic_arithmetic_1-spark.json deleted file mode 100644 index 3608093e1..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_1/basic_arithmetic_1-spark.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "spark:csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "basic_arithmetic_1_str", - "source": "spark:csv:basic_arithmetic_1.csv" - } - ], - "structures": [ - { - "name": "basic_arithmetic_1_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_1/basic_arithmetic_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_1/basic_arithmetic_1.csv deleted file mode 100644 index b1a2d1962..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_1/basic_arithmetic_1.csv +++ /dev/null @@ -1,7 +0,0 @@ -time_period,num_1,num_2 -1999,-17.1428571,0.0002856 -2000,-0.4285714,0.1428571 -2001,-14.1428571,-11.5058429 -2002,,-1371.8571429 -2003,-3.4285714, -2004,-5.000000000000000,-3.4285714 diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_1/basic_arithmetic_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_1/basic_arithmetic_1.json deleted file mode 100644 index 46e0e11a6..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_1/basic_arithmetic_1.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "basic_arithmetic_1_str", - "source": "csv:basic_arithmetic_1.csv" - } - ], - "structures": [ - { - "name": "basic_arithmetic_1_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_1/basic_arithmetic_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_1/basic_arithmetic_1.vtl deleted file mode 100644 index 366457031..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_1/basic_arithmetic_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= round(number_test7 * (2 - number_test7)/7, 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_2/basic_arithmetic_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_2/basic_arithmetic_2-spark.json deleted file mode 100644 index c61ff6103..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_2/basic_arithmetic_2-spark.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "spark:csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "basic_arithmetic_2_str", - "source": "spark:csv:basic_arithmetic_2.csv" - } - ], - "structures": [ - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "basic_arithmetic_2_str", - "components": [ - { - "name": "num_3", - "role": "Measure" - }, - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "num_3", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_2/basic_arithmetic_2.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_2/basic_arithmetic_2.csv deleted file mode 100644 index a664d8b09..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_2/basic_arithmetic_2.csv +++ /dev/null @@ -1,7 +0,0 @@ -time_period,num_1,num_2,num_3 -1999,12,0.001,-95.9760 -2000,3,0.9999,-18.0006 -2001,-9,10.03,-108.5400 -2002,,99, -2003,6,, -2004,7,-4,-112.0000 diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_2/basic_arithmetic_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_2/basic_arithmetic_2.json deleted file mode 100644 index e32e264a6..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_2/basic_arithmetic_2.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "basic_arithmetic_2_str", - "source": "csv:basic_arithmetic_2.csv" - } - ], - "structures": [ - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "basic_arithmetic_2_str", - "components": [ - { - "name": "num_3", - "role": "Measure" - }, - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "num_3", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_2/basic_arithmetic_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_2/basic_arithmetic_2.vtl deleted file mode 100644 index a71252f6f..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/basic_arithmetic_2/basic_arithmetic_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= number_test7[calc Num_3:= round(Num_1 / 0.5 * (Num_2 - 4), 7)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_1/between_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_1/between_1-spark.json deleted file mode 100644 index 9b7739689..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_1/between_1-spark.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "datasets": [ - { - "name": "between_test", - "source": "spark:csv:between_test.csv", - "structure": "between_test_str" - }, - { - "name": "expected", - "structure": "between_1_str", - "source": "spark:csv:between_1.csv" - } - ], - "structures": [ - { - "name": "between_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "between_1_str", - "components": [ - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "year", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "year", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_1/between_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_1/between_1.json deleted file mode 100644 index 38607b89b..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_1/between_1.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "datasets": [ - { - "name": "between_test", - "source": "csv:between_test.csv", - "structure": "between_test_str" - }, - { - "name": "expected", - "structure": "between_1_str", - "source": "csv:between_1.csv" - } - ], - "structures": [ - { - "name": "between_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "between_1_str", - "components": [ - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "year", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "year", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_1/between_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_1/between_1.vtl deleted file mode 100644 index 06d4ac814..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_1/between_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= between(between_test, -1, 5); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_2/between_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_2/between_2-spark.json deleted file mode 100644 index ce8da8433..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_2/between_2-spark.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "between_test", - "source": "spark:csv:between_test.csv", - "structure": "between_test_str" - }, - { - "name": "expected", - "structure": "between_2_str", - "source": "spark:csv:between_2.csv" - } - ], - "structures": [ - { - "name": "between_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "between_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - }, - { - "name": "btwn", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "year", - "domain": "number" - }, - { - "name": "btwn", - "domain": "boolean" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_2/between_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_2/between_2.json deleted file mode 100644 index bcb50f410..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_2/between_2.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "between_test", - "source": "csv:between_test.csv", - "structure": "between_test_str" - }, - { - "name": "expected", - "structure": "between_2_str", - "source": "csv:between_2.csv" - } - ], - "structures": [ - { - "name": "between_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "between_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - }, - { - "name": "btwn", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "year", - "domain": "number" - }, - { - "name": "btwn", - "domain": "boolean" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_2/between_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_2/between_2.vtl deleted file mode 100644 index 4b67c44f2..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/between_2/between_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= between_test[calc btwn:= between(Num_1, 4, 10)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_1/boolean_and_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_1/boolean_and_1-spark.json deleted file mode 100644 index e45a5762c..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_1/boolean_and_1-spark.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test2", - "source": "spark:csv:boolean_test2.csv", - "structure": "boolean_test2_str" - }, - { - "name": "boolean_test1", - "source": "spark:csv:boolean_test1.csv", - "structure": "boolean_test1_str" - }, - { - "name": "expected", - "structure": "boolean_and_1_str", - "source": "spark:csv:boolean_and_1.csv" - } - ], - "structures": [ - { - "name": "boolean_test2_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "boolean_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "boolean_and_1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "m1", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_1/boolean_and_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_1/boolean_and_1.json deleted file mode 100644 index 09ccf4e8c..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_1/boolean_and_1.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test2", - "source": "csv:boolean_test2.csv", - "structure": "boolean_test2_str" - }, - { - "name": "boolean_test1", - "source": "csv:boolean_test1.csv", - "structure": "boolean_test1_str" - }, - { - "name": "expected", - "structure": "boolean_and_1_str", - "source": "csv:boolean_and_1.csv" - } - ], - "structures": [ - { - "name": "boolean_test2_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "boolean_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "boolean_and_1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "m1", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_1/boolean_and_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_1/boolean_and_1.vtl deleted file mode 100644 index a42435513..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_1/boolean_and_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := boolean_test1 and boolean_test2; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_2/boolean_and_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_2/boolean_and_2-spark.json deleted file mode 100644 index 5ff4a3405..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_2/boolean_and_2-spark.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test3", - "source": "spark:csv:boolean_test3.csv", - "structure": "boolean_test3_str" - }, - { - "name": "expected", - "structure": "boolean_and_2_str", - "source": "spark:csv:boolean_and_2.csv" - } - ], - "structures": [ - { - "name": "boolean_test3_str", - "components": [ - { - "name": "m2", - "role": "Measure" - }, - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "boolean_and_2_str", - "components": [ - { - "name": "m2", - "role": "Measure" - }, - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "m3", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id1", - "domain": "string" - }, - { - "name": "m3", - "domain": "boolean" - }, - { - "name": "m2", - "domain": "boolean" - }, - { - "name": "m1", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_2/boolean_and_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_2/boolean_and_2.json deleted file mode 100644 index 351b4fb4c..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_2/boolean_and_2.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test3", - "source": "csv:boolean_test3.csv", - "structure": "boolean_test3_str" - }, - { - "name": "expected", - "structure": "boolean_and_2_str", - "source": "csv:boolean_and_2.csv" - } - ], - "structures": [ - { - "name": "boolean_test3_str", - "components": [ - { - "name": "m2", - "role": "Measure" - }, - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "boolean_and_2_str", - "components": [ - { - "name": "m2", - "role": "Measure" - }, - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "m3", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id1", - "domain": "string" - }, - { - "name": "m3", - "domain": "boolean" - }, - { - "name": "m2", - "domain": "boolean" - }, - { - "name": "m1", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_2/boolean_and_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_2/boolean_and_2.vtl deleted file mode 100644 index afd74654a..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_and_2/boolean_and_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := boolean_test3[calc m3 := m1 and m2]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_not_1/boolean_not_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_not_1/boolean_not_1-spark.json deleted file mode 100644 index ac6b7c122..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_not_1/boolean_not_1-spark.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test1", - "source": "spark:csv:boolean_test1.csv", - "structure": "boolean_test1_str" - }, - { - "name": "expected", - "structure": "boolean_not_1_str", - "source": "spark:csv:boolean_not_1.csv" - } - ], - "structures": [ - { - "name": "boolean_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "boolean_not_1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "m1", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_not_1/boolean_not_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_not_1/boolean_not_1.json deleted file mode 100644 index 06a8cc97f..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_not_1/boolean_not_1.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test1", - "source": "csv:boolean_test1.csv", - "structure": "boolean_test1_str" - }, - { - "name": "expected", - "structure": "boolean_not_1_str", - "source": "csv:boolean_not_1.csv" - } - ], - "structures": [ - { - "name": "boolean_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "boolean_not_1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "m1", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_not_1/boolean_not_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_not_1/boolean_not_1.vtl deleted file mode 100644 index 7db9e44ca..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_not_1/boolean_not_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := not boolean_test1; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_1/boolean_or_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_1/boolean_or_1-spark.json deleted file mode 100644 index dcb6c9865..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_1/boolean_or_1-spark.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test2", - "source": "spark:csv:boolean_test2.csv", - "structure": "boolean_test2_str" - }, - { - "name": "boolean_test1", - "source": "spark:csv:boolean_test1.csv", - "structure": "boolean_test1_str" - }, - { - "name": "expected", - "structure": "boolean_or_1_str", - "source": "spark:csv:boolean_or_1.csv" - } - ], - "structures": [ - { - "name": "boolean_test2_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "boolean_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "boolean_or_1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "m1", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_1/boolean_or_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_1/boolean_or_1.json deleted file mode 100644 index d9a2aa8a9..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_1/boolean_or_1.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test2", - "source": "csv:boolean_test2.csv", - "structure": "boolean_test2_str" - }, - { - "name": "boolean_test1", - "source": "csv:boolean_test1.csv", - "structure": "boolean_test1_str" - }, - { - "name": "expected", - "structure": "boolean_or_1_str", - "source": "csv:boolean_or_1.csv" - } - ], - "structures": [ - { - "name": "boolean_test2_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "boolean_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "boolean_or_1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "m1", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_1/boolean_or_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_1/boolean_or_1.vtl deleted file mode 100644 index 9a53e1fa8..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_1/boolean_or_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := boolean_test1 or boolean_test2; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_2/boolean_or_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_2/boolean_or_2-spark.json deleted file mode 100644 index bb6f62f36..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_2/boolean_or_2-spark.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test3", - "source": "spark:csv:boolean_test3.csv", - "structure": "boolean_test3_str" - }, - { - "name": "expected", - "structure": "boolean_or_2_str", - "source": "spark:csv:boolean_or_2.csv" - } - ], - "structures": [ - { - "name": "boolean_test3_str", - "components": [ - { - "name": "m2", - "role": "Measure" - }, - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "boolean_or_2_str", - "components": [ - { - "name": "m2", - "role": "Measure" - }, - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "m3", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id1", - "domain": "string" - }, - { - "name": "m3", - "domain": "boolean" - }, - { - "name": "m2", - "domain": "boolean" - }, - { - "name": "m1", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_2/boolean_or_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_2/boolean_or_2.json deleted file mode 100644 index eaae2a581..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_2/boolean_or_2.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test3", - "source": "csv:boolean_test3.csv", - "structure": "boolean_test3_str" - }, - { - "name": "expected", - "structure": "boolean_or_2_str", - "source": "csv:boolean_or_2.csv" - } - ], - "structures": [ - { - "name": "boolean_test3_str", - "components": [ - { - "name": "m2", - "role": "Measure" - }, - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "boolean_or_2_str", - "components": [ - { - "name": "m2", - "role": "Measure" - }, - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "m3", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id1", - "domain": "string" - }, - { - "name": "m3", - "domain": "boolean" - }, - { - "name": "m2", - "domain": "boolean" - }, - { - "name": "m1", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_2/boolean_or_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_2/boolean_or_2.vtl deleted file mode 100644 index 9c3a0b970..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_or_2/boolean_or_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := boolean_test3[calc m3 := m1 or m2]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_1/boolean_xor_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_1/boolean_xor_1-spark.json deleted file mode 100644 index aa46d76a4..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_1/boolean_xor_1-spark.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test2", - "source": "spark:csv:boolean_test2.csv", - "structure": "boolean_test2_str" - }, - { - "name": "boolean_test1", - "source": "spark:csv:boolean_test1.csv", - "structure": "boolean_test1_str" - }, - { - "name": "expected", - "structure": "boolean_xor_1_str", - "source": "spark:csv:boolean_xor_1.csv" - } - ], - "structures": [ - { - "name": "boolean_test2_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "boolean_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "boolean_xor_1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "m1", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_1/boolean_xor_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_1/boolean_xor_1.json deleted file mode 100644 index edbf2968a..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_1/boolean_xor_1.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test2", - "source": "csv:boolean_test2.csv", - "structure": "boolean_test2_str" - }, - { - "name": "boolean_test1", - "source": "csv:boolean_test1.csv", - "structure": "boolean_test1_str" - }, - { - "name": "expected", - "structure": "boolean_xor_1_str", - "source": "csv:boolean_xor_1.csv" - } - ], - "structures": [ - { - "name": "boolean_test2_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "boolean_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "boolean_xor_1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "m1", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_1/boolean_xor_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_1/boolean_xor_1.vtl deleted file mode 100644 index 8979593ea..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_1/boolean_xor_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := boolean_test1 xor boolean_test2; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_2/boolean_xor_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_2/boolean_xor_2-spark.json deleted file mode 100644 index 234bae8bb..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_2/boolean_xor_2-spark.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test3", - "source": "spark:csv:boolean_test3.csv", - "structure": "boolean_test3_str" - }, - { - "name": "expected", - "structure": "boolean_xor_2_str", - "source": "spark:csv:boolean_xor_2.csv" - } - ], - "structures": [ - { - "name": "boolean_test3_str", - "components": [ - { - "name": "m2", - "role": "Measure" - }, - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "boolean_xor_2_str", - "components": [ - { - "name": "m2", - "role": "Measure" - }, - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "m3", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id1", - "domain": "string" - }, - { - "name": "m3", - "domain": "boolean" - }, - { - "name": "m2", - "domain": "boolean" - }, - { - "name": "m1", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_2/boolean_xor_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_2/boolean_xor_2.json deleted file mode 100644 index 2bd6344ee..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_2/boolean_xor_2.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test3", - "source": "csv:boolean_test3.csv", - "structure": "boolean_test3_str" - }, - { - "name": "expected", - "structure": "boolean_xor_2_str", - "source": "csv:boolean_xor_2.csv" - } - ], - "structures": [ - { - "name": "boolean_test3_str", - "components": [ - { - "name": "m2", - "role": "Measure" - }, - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "boolean_xor_2_str", - "components": [ - { - "name": "m2", - "role": "Measure" - }, - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "m3", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id1", - "domain": "string" - }, - { - "name": "m3", - "domain": "boolean" - }, - { - "name": "m2", - "domain": "boolean" - }, - { - "name": "m1", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_2/boolean_xor_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_2/boolean_xor_2.vtl deleted file mode 100644 index 76771835c..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/boolean_xor_2/boolean_xor_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := boolean_test3[calc m3 := m1 xor m2]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc/calc-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc/calc-spark.json deleted file mode 100644 index 9e161d755..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc/calc-spark.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "spark:csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "number_test1_str", - "source": "spark:csv:calc.csv" - } - ], - "structures": [ - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc/calc.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc/calc.json deleted file mode 100644 index d4e342b50..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc/calc.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "number_test1_str", - "source": "csv:calc.csv" - } - ], - "structures": [ - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc/calc.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc/calc.vtl deleted file mode 100644 index 7ff5bd6a5..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc/calc.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := number_test1[calc m1 := m1 + m1]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc_1/calc_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc_1/calc_1-spark.json deleted file mode 100644 index 48db334b7..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc_1/calc_1-spark.json +++ /dev/null @@ -1,252 +0,0 @@ -{ - "datasets": [ - { - "name": "ecbexrusd_vtl", - "source": "spark:csv:ecbexrusd_vtl.csv", - "structure": "ecbexrusd_vtl_str" - }, - { - "name": "expected", - "structure": "calc_1_str", - "source": "spark:csv:calc_1.csv" - } - ], - "structures": [ - { - "name": "calc_1_str", - "components": [ - { - "name": "me_sum", - "role": "Measure" - }, - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - }, - { - "name": "ecbexrusd_vtl_str", - "components": [ - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "unit", - "domain": "string" - }, - { - "name": "decimals", - "domain": "string" - }, - { - "name": "currency_denom", - "domain": "string" - }, - { - "name": "source_agency", - "domain": "string" - }, - { - "name": "exr_suffix", - "domain": "string" - }, - { - "name": "collection", - "domain": "string" - }, - { - "name": "title", - "domain": "string" - }, - { - "name": "freq", - "domain": "string" - }, - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id", - "domain": "string" - }, - { - "name": "exr_type", - "domain": "string" - }, - { - "name": "time_format", - "domain": "string" - }, - { - "name": "obs_status", - "domain": "string" - }, - { - "name": "year", - "domain": "integer" - }, - { - "name": "unit_mult", - "domain": "string" - }, - { - "name": "currency", - "domain": "string" - }, - { - "name": "me_2", - "domain": "integer" - }, - { - "name": "me_sum", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc_1/calc_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc_1/calc_1.json deleted file mode 100644 index 0dfc57450..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc_1/calc_1.json +++ /dev/null @@ -1,252 +0,0 @@ -{ - "datasets": [ - { - "name": "ecbexrusd_vtl", - "source": "csv:ecbexrusd_vtl.csv", - "structure": "ecbexrusd_vtl_str" - }, - { - "name": "expected", - "structure": "calc_1_str", - "source": "csv:calc_1.csv" - } - ], - "structures": [ - { - "name": "calc_1_str", - "components": [ - { - "name": "me_sum", - "role": "Measure" - }, - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - }, - { - "name": "ecbexrusd_vtl_str", - "components": [ - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "unit", - "domain": "string" - }, - { - "name": "decimals", - "domain": "string" - }, - { - "name": "currency_denom", - "domain": "string" - }, - { - "name": "source_agency", - "domain": "string" - }, - { - "name": "exr_suffix", - "domain": "string" - }, - { - "name": "collection", - "domain": "string" - }, - { - "name": "title", - "domain": "string" - }, - { - "name": "freq", - "domain": "string" - }, - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id", - "domain": "string" - }, - { - "name": "exr_type", - "domain": "string" - }, - { - "name": "time_format", - "domain": "string" - }, - { - "name": "obs_status", - "domain": "string" - }, - { - "name": "year", - "domain": "integer" - }, - { - "name": "unit_mult", - "domain": "string" - }, - { - "name": "currency", - "domain": "string" - }, - { - "name": "me_2", - "domain": "integer" - }, - { - "name": "me_sum", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc_1/calc_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc_1/calc_1.vtl deleted file mode 100644 index e455eafca..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/calc_1/calc_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= ecbexrusd_vtl[calc Me_sum := Me_1 + Me_2]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_1/case_conversion_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_1/case_conversion_1-spark.json deleted file mode 100644 index 9683ead48..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_1/case_conversion_1-spark.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "datasets": [ - { - "name": "trim_test", - "source": "spark:csv:trim_test.csv", - "structure": "trim_test_str" - }, - { - "name": "expected", - "structure": "case_conversion_1_str", - "source": "spark:csv:case_conversion_1.csv" - } - ], - "structures": [ - { - "name": "trim_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "case_conversion_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "text_low", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "text_up", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "text_low", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "text_up", - "domain": "string" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "text_2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_1/case_conversion_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_1/case_conversion_1.json deleted file mode 100644 index 197bc20d4..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_1/case_conversion_1.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "datasets": [ - { - "name": "trim_test", - "source": "csv:trim_test.csv", - "structure": "trim_test_str" - }, - { - "name": "expected", - "structure": "case_conversion_1_str", - "source": "csv:case_conversion_1.csv" - } - ], - "structures": [ - { - "name": "trim_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "case_conversion_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "text_low", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "text_up", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "text_low", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "text_up", - "domain": "string" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "text_2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_1/case_conversion_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_1/case_conversion_1.vtl deleted file mode 100644 index 78ae513cc..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_1/case_conversion_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= trim_test[ calc Text_up:= upper(Text_1), Text_low:= lower(Text_2)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_2/case_conversion_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_2/case_conversion_2-spark.json deleted file mode 100644 index 564686c65..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_2/case_conversion_2-spark.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "datasets": [ - { - "name": "trim_test", - "source": "spark:csv:trim_test.csv", - "structure": "trim_test_str" - }, - { - "name": "expected", - "structure": "case_conversion_2_str", - "source": "spark:csv:case_conversion_2.csv" - } - ], - "structures": [ - { - "name": "trim_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "case_conversion_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "text_2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_2/case_conversion_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_2/case_conversion_2.json deleted file mode 100644 index 3ac0dd973..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_2/case_conversion_2.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "datasets": [ - { - "name": "trim_test", - "source": "csv:trim_test.csv", - "structure": "trim_test_str" - }, - { - "name": "expected", - "structure": "case_conversion_2_str", - "source": "csv:case_conversion_2.csv" - } - ], - "structures": [ - { - "name": "trim_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "case_conversion_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "text_2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_2/case_conversion_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_2/case_conversion_2.vtl deleted file mode 100644 index c44c21e0e..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_2/case_conversion_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= upper(trim_test); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_3/case_conversion_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_3/case_conversion_3-spark.json deleted file mode 100644 index 86e4af248..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_3/case_conversion_3-spark.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "datasets": [ - { - "name": "trim_test", - "source": "spark:csv:trim_test.csv", - "structure": "trim_test_str" - }, - { - "name": "expected", - "structure": "case_conversion_3_str", - "source": "spark:csv:case_conversion_3.csv" - } - ], - "structures": [ - { - "name": "trim_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "case_conversion_3_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "text_2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_3/case_conversion_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_3/case_conversion_3.json deleted file mode 100644 index 98057292e..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_3/case_conversion_3.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "datasets": [ - { - "name": "trim_test", - "source": "csv:trim_test.csv", - "structure": "trim_test_str" - }, - { - "name": "expected", - "structure": "case_conversion_3_str", - "source": "csv:case_conversion_3.csv" - } - ], - "structures": [ - { - "name": "trim_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "case_conversion_3_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "text_2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_3/case_conversion_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_3/case_conversion_3.vtl deleted file mode 100644 index 020f25f9f..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/case_conversion_3/case_conversion_3.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= lower(trim_test); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil/ceil-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil/ceil-spark.json deleted file mode 100644 index 5740e8d0a..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil/ceil-spark.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test2", - "source": "spark:csv:number_test3.csv", - "structure": "number_test3_str" - }, - { - "name": "expected", - "structure": "number_test3_str", - "source": "spark:csv:ceil.csv" - } - ], - "structures": [ - { - "name": "number_test3_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil/ceil.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil/ceil.json deleted file mode 100644 index 2ca8118e0..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil/ceil.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test2", - "source": "csv:number_test3.csv", - "structure": "number_test3_str" - }, - { - "name": "expected", - "structure": "number_test3_str", - "source": "csv:ceil.csv" - } - ], - "structures": [ - { - "name": "number_test3_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_1/ceil_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_1/ceil_1-spark.json deleted file mode 100644 index 84c0f7a47..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_1/ceil_1-spark.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "spark:csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "ceil_1_str", - "source": "spark:csv:ceil_1.csv" - } - ], - "structures": [ - { - "name": "ceil_1_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_1/ceil_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_1/ceil_1.json deleted file mode 100644 index 96d592689..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_1/ceil_1.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "ceil_1_str", - "source": "csv:ceil_1.csv" - } - ], - "structures": [ - { - "name": "ceil_1_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_1/ceil_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_1/ceil_1.vtl deleted file mode 100644 index 02e466b1b..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_1/ceil_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= ceil (number_test7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_floor_1/ceil_floor_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_floor_1/ceil_floor_1-spark.json deleted file mode 100644 index 88433395c..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_floor_1/ceil_floor_1-spark.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "spark:csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "ceil_floor_1_str", - "source": "spark:csv:ceil_floor_1.csv" - } - ], - "structures": [ - { - "name": "ceil_floor_1_str", - "components": [ - { - "name": "num_ceil", - "role": "Measure" - }, - { - "name": "num_floor", - "role": "Measure" - }, - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "num_ceil", - "domain": "number" - }, - { - "name": "num_floor", - "domain": "number" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_floor_1/ceil_floor_1.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_floor_1/ceil_floor_1.csv deleted file mode 100644 index ad28db708..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_floor_1/ceil_floor_1.csv +++ /dev/null @@ -1,7 +0,0 @@ -time_period,num_1,num_2,num_ceil,num_floor -1999,12,0.001,1,0 -2000,3,0.9999,1,0 -2001,-9,10.03,11,10 -2002,,99,99,99 -2003,6,,, -2004,7,-4,-4,-4 diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_floor_1/ceil_floor_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_floor_1/ceil_floor_1.json deleted file mode 100644 index e17bfb77a..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_floor_1/ceil_floor_1.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "ceil_floor_1_str", - "source": "csv:ceil_floor_1.csv" - } - ], - "structures": [ - { - "name": "ceil_floor_1_str", - "components": [ - { - "name": "num_ceil", - "role": "Measure" - }, - { - "name": "num_floor", - "role": "Measure" - }, - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "num_ceil", - "domain": "number" - }, - { - "name": "num_floor", - "domain": "number" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_floor_1/ceil_floor_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_floor_1/ceil_floor_1.vtl deleted file mode 100644 index 9877da86e..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ceil_floor_1/ceil_floor_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= number_test7[calc Num_ceil:= ceil (Num_2), Num_floor:= floor (Num_2)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/count/count-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/count/count-spark.json deleted file mode 100644 index c53aba84c..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/count/count-spark.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "ratiotoreport", - "source": "spark:csv:ratiotoreport.csv", - "structure": "ratiotoreport_str" - }, - { - "name": "expected", - "structure": "count_str", - "source": "spark:csv:count.csv" - } - ], - "structures": [ - { - "name": "ratiotoreport_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "count_str", - "components": [ - { - "name": "integer_var", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "integer_var", - "domain": "integer" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/count/count.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/count/count.json deleted file mode 100644 index 65b4ac873..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/count/count.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "ratiotoreport", - "source": "csv:ratiotoreport.csv", - "structure": "ratiotoreport_str" - }, - { - "name": "expected", - "structure": "count_str", - "source": "csv:count.csv" - } - ], - "structures": [ - { - "name": "ratiotoreport_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "count_str", - "components": [ - { - "name": "integer_var", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "integer_var", - "domain": "integer" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/count/count.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/count/count.vtl deleted file mode 100644 index 598758e3c..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/count/count.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= count(ratiotoreport group by Id_1, Id_2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/div/div-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/div/div-spark.json deleted file mode 100644 index 4df0bce21..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/div/div-spark.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "spark:csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "number_div_1_str", - "source": "spark:csv:div.csv" - } - ], - "structures": [ - { - "name": "number_div_1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/div/div.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/div/div.json deleted file mode 100644 index 117748052..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/div/div.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "number_div_1_str", - "source": "csv:div.csv" - } - ], - "structures": [ - { - "name": "number_div_1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/div/div.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/div/div.vtl deleted file mode 100644 index 1a6f9c31e..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/div/div.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := (number_test1 / number_test1); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/drop/drop-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/drop/drop-spark.json deleted file mode 100644 index 98f6d0002..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/drop/drop-spark.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test6", - "source": "spark:csv:number_test6.csv", - "structure": "number_test6_str" - }, - { - "name": "expected", - "structure": "clauses_drop_1_str", - "source": "spark:csv:drop.csv" - } - ], - "structures": [ - { - "name": "number_test6_str", - "components": [ - { - "name": "m2", - "role": "Measure" - }, - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "id2", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - }, - { - "name": "clauses_drop_1_str", - "components": [ - { - "name": "m2", - "role": "Measure" - }, - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "id2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "m2", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "id2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/drop/drop.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/drop/drop.json deleted file mode 100644 index 93825dfa8..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/drop/drop.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test6", - "source": "csv:number_test6.csv", - "structure": "number_test6_str" - }, - { - "name": "expected", - "structure": "clauses_drop_1_str", - "source": "csv:drop.csv" - } - ], - "structures": [ - { - "name": "number_test6_str", - "components": [ - { - "name": "m2", - "role": "Measure" - }, - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "id2", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - }, - { - "name": "clauses_drop_1_str", - "components": [ - { - "name": "m2", - "role": "Measure" - }, - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "id2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "m2", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "id2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/drop/drop.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/drop/drop.vtl deleted file mode 100644 index a23424d88..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/drop/drop.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := number_test6[drop m1, att1]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_1/element_of_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_1/element_of_1-spark.json deleted file mode 100644 index e03a31661..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_1/element_of_1-spark.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "datasets": [ - { - "name": "between_test", - "source": "spark:csv:between_test.csv", - "structure": "between_test_str" - }, - { - "name": "expected", - "structure": "element_of_1_str", - "source": "spark:csv:element_of_1.csv" - } - ], - "structures": [ - { - "name": "element_of_1_str", - "components": [ - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "year", - "role": "Identifier" - } - ] - }, - { - "name": "between_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "year", - "domain": "integer" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "integer" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_1/element_of_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_1/element_of_1.json deleted file mode 100644 index 277d52f58..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_1/element_of_1.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "datasets": [ - { - "name": "between_test", - "source": "csv:between_test.csv", - "structure": "between_test_str" - }, - { - "name": "expected", - "structure": "element_of_1_str", - "source": "csv:element_of_1.csv" - } - ], - "structures": [ - { - "name": "element_of_1_str", - "components": [ - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "year", - "role": "Identifier" - } - ] - }, - { - "name": "between_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "year", - "domain": "integer" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "integer" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_1/element_of_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_1/element_of_1.vtl deleted file mode 100644 index 7417d6ca4..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_1/element_of_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= between_test in { 0, 3, 6, 12 }; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_2/element_of_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_2/element_of_2-spark.json deleted file mode 100644 index a33b3c7cd..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_2/element_of_2-spark.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "datasets": [ - { - "name": "between_test", - "source": "spark:csv:between_test.csv", - "structure": "between_test_str" - }, - { - "name": "expected", - "structure": "element_of_2_str", - "source": "spark:csv:element_of_2.csv" - } - ], - "structures": [ - { - "name": "element_of_2_str", - "components": [ - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "year", - "role": "Identifier" - } - ] - }, - { - "name": "between_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "year", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_2/element_of_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_2/element_of_2.json deleted file mode 100644 index 5119a7c11..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_2/element_of_2.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "datasets": [ - { - "name": "between_test", - "source": "csv:between_test.csv", - "structure": "between_test_str" - }, - { - "name": "expected", - "structure": "element_of_2_str", - "source": "csv:element_of_2.csv" - } - ], - "structures": [ - { - "name": "element_of_2_str", - "components": [ - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "year", - "role": "Identifier" - } - ] - }, - { - "name": "between_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "year", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_2/element_of_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_2/element_of_2.vtl deleted file mode 100644 index 161e0cd7b..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_2/element_of_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= between_test#Year in {1996, 2000, 2004, 2008, 2012, 2016, 2020, 2024}; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_3/element_of_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_3/element_of_3-spark.json deleted file mode 100644 index 5639ad30a..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_3/element_of_3-spark.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "between_test", - "source": "spark:csv:between_test.csv", - "structure": "between_test_str" - }, - { - "name": "expected", - "structure": "element_of_3_str", - "source": "spark:csv:element_of_3.csv" - } - ], - "structures": [ - { - "name": "between_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "element_of_3_str", - "components": [ - { - "name": "isleap", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "isleap", - "domain": "boolean" - }, - { - "name": "year", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_3/element_of_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_3/element_of_3.json deleted file mode 100644 index 6f96e3f18..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_3/element_of_3.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "between_test", - "source": "csv:between_test.csv", - "structure": "between_test_str" - }, - { - "name": "expected", - "structure": "element_of_3_str", - "source": "csv:element_of_3.csv" - } - ], - "structures": [ - { - "name": "between_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "element_of_3_str", - "components": [ - { - "name": "isleap", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "isleap", - "domain": "boolean" - }, - { - "name": "year", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_3/element_of_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_3/element_of_3.vtl deleted file mode 100644 index 4c15846fb..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/element_of_3/element_of_3.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= between_test[ calc isleap:= Year in {1996, 2000, 2004, 2008, 2012, 2016, 2020, 2024}]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal/equal-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal/equal-spark.json deleted file mode 100644 index dd302513a..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal/equal-spark.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test4", - "source": "spark:csv:number_test4.csv", - "structure": "number_test4_str" - }, - { - "name": "comparison_eq_1", - "source": "spark:csv:comparison_eq_1.csv", - "structure": "comparison_eq_1_str" - }, - { - "name": "number_test1", - "source": "spark:csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "equal_str", - "source": "spark:csv:equal.csv" - } - ], - "structures": [ - { - "name": "equal_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - } - ] - }, - { - "name": "number_test4_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "comparison_eq_1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal/equal.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal/equal.json deleted file mode 100644 index c5f072d7d..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal/equal.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test4", - "source": "csv:number_test4.csv", - "structure": "number_test4_str" - }, - { - "name": "comparison_eq_1", - "source": "csv:comparison_eq_1.csv", - "structure": "comparison_eq_1_str" - }, - { - "name": "number_test1", - "source": "csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "equal_str", - "source": "csv:equal.csv" - } - ], - "structures": [ - { - "name": "equal_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - } - ] - }, - { - "name": "number_test4_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "comparison_eq_1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal/equal.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal/equal.vtl deleted file mode 100644 index f0647a5a0..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal/equal.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := number_test1 = number_test4; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_1/equal_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_1/equal_1-spark.json deleted file mode 100644 index b41560dd9..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_1/equal_1-spark.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "datasets": [ - { - "name": "dataset_comparison_test2", - "source": "spark:csv:dataset_comparison_test2.csv", - "structure": "dataset_comparison_test2_str" - }, - { - "name": "eq_1", - "source": "spark:csv:eq_1.csv", - "structure": "eq_1_str" - }, - { - "name": "dataset_comparison_test1", - "source": "spark:csv:dataset_comparison_test1.csv", - "structure": "dataset_comparison_test1_str" - }, - { - "name": "expected", - "structure": "equal_1_str", - "source": "spark:csv:equal_1.csv" - } - ], - "structures": [ - { - "name": "equal_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "dataset_comparison_test2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "eq_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "dataset_comparison_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_1/equal_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_1/equal_1.json deleted file mode 100644 index cc1dcb0aa..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_1/equal_1.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "datasets": [ - { - "name": "dataset_comparison_test2", - "source": "csv:dataset_comparison_test2.csv", - "structure": "dataset_comparison_test2_str" - }, - { - "name": "eq_1", - "source": "csv:eq_1.csv", - "structure": "eq_1_str" - }, - { - "name": "dataset_comparison_test1", - "source": "csv:dataset_comparison_test1.csv", - "structure": "dataset_comparison_test1_str" - }, - { - "name": "expected", - "structure": "equal_1_str", - "source": "csv:equal_1.csv" - } - ], - "structures": [ - { - "name": "equal_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "dataset_comparison_test2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "eq_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "dataset_comparison_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_1/equal_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_1/equal_1.vtl deleted file mode 100644 index 57740f6d7..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_1/equal_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= dataset_comparison_test1=dataset_comparison_test2; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_2/equal_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_2/equal_2-spark.json deleted file mode 100644 index f553cc4ba..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_2/equal_2-spark.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "datasets": [ - { - "name": "dataset_comparison_test2", - "source": "spark:csv:dataset_comparison_test2.csv", - "structure": "dataset_comparison_test2_str" - }, - { - "name": "dataset_comparison_test1", - "source": "spark:csv:dataset_comparison_test1.csv", - "structure": "dataset_comparison_test1_str" - }, - { - "name": "expected", - "structure": "eq_2_str", - "source": "spark:csv:equal_2.csv" - } - ], - "structures": [ - { - "name": "dataset_comparison_test2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "dataset_comparison_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "eq_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "eq", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "eq", - "domain": "boolean" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_2/equal_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_2/equal_2.json deleted file mode 100644 index 24fdbc1df..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_2/equal_2.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "datasets": [ - { - "name": "dataset_comparison_test2", - "source": "csv:dataset_comparison_test2.csv", - "structure": "dataset_comparison_test2_str" - }, - { - "name": "dataset_comparison_test1", - "source": "csv:dataset_comparison_test1.csv", - "structure": "dataset_comparison_test1_str" - }, - { - "name": "expected", - "structure": "eq_2_str", - "source": "csv:equal_2.csv" - } - ], - "structures": [ - { - "name": "dataset_comparison_test2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "dataset_comparison_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "eq_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "eq", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "eq", - "domain": "boolean" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_2/equal_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_2/equal_2.vtl deleted file mode 100644 index 0a6ba3cdb..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/equal_2/equal_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= dataset_comparison_test1[calc eq:=Num_1=10]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_1/exists_in_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_1/exists_in_1-spark.json deleted file mode 100644 index bac5e1ca5..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_1/exists_in_1-spark.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "datasets": [ - { - "name": "match_characters_test", - "source": "spark:csv:match_characters_test.csv", - "structure": "match_characters_test_str" - }, - { - "name": "exists_in_test2", - "source": "spark:csv:exists_in_test2.csv", - "structure": "exists_in_test2_str" - }, - { - "name": "expected", - "structure": "exists_in_1_str", - "source": "spark:csv:exists_in_1.csv" - } - ], - "structures": [ - { - "name": "match_characters_test_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "exists_in_1_str", - "components": [ - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "exists_in_test2_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_1/exists_in_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_1/exists_in_1.json deleted file mode 100644 index 0b815fbde..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_1/exists_in_1.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "datasets": [ - { - "name": "match_characters_test", - "source": "csv:match_characters_test.csv", - "structure": "match_characters_test_str" - }, - { - "name": "exists_in_test2", - "source": "csv:exists_in_test2.csv", - "structure": "exists_in_test2_str" - }, - { - "name": "expected", - "structure": "exists_in_1_str", - "source": "csv:exists_in_1.csv" - } - ], - "structures": [ - { - "name": "match_characters_test_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "exists_in_1_str", - "components": [ - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "exists_in_test2_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_1/exists_in_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_1/exists_in_1.vtl deleted file mode 100644 index a598ef126..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_1/exists_in_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= exists_in(match_characters_test, exists_in_test2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_2/exists_in_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_2/exists_in_2-spark.json deleted file mode 100644 index 53ccc6626..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_2/exists_in_2-spark.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "datasets": [ - { - "name": "match_characters_test", - "source": "spark:csv:match_characters_test.csv", - "structure": "match_characters_test_str" - }, - { - "name": "exists_in_1", - "source": "spark:csv:exists_in_1.csv", - "structure": "exists_in_1_str" - }, - { - "name": "exists_in_test2", - "source": "spark:csv:exists_in_test2.csv", - "structure": "exists_in_test2_str" - }, - { - "name": "expected", - "structure": "exists_in_2_str", - "source": "spark:csv:exists_in_2.csv" - } - ], - "structures": [ - { - "name": "exists_in_2_str", - "components": [ - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "match_characters_test_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "exists_in_1_str", - "components": [ - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "exists_in_test2_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_2/exists_in_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_2/exists_in_2.json deleted file mode 100644 index 86390b7a9..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_2/exists_in_2.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "datasets": [ - { - "name": "match_characters_test", - "source": "csv:match_characters_test.csv", - "structure": "match_characters_test_str" - }, - { - "name": "exists_in_1", - "source": "csv:exists_in_1.csv", - "structure": "exists_in_1_str" - }, - { - "name": "exists_in_test2", - "source": "csv:exists_in_test2.csv", - "structure": "exists_in_test2_str" - }, - { - "name": "expected", - "structure": "exists_in_2_str", - "source": "csv:exists_in_2.csv" - } - ], - "structures": [ - { - "name": "exists_in_2_str", - "components": [ - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "match_characters_test_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "exists_in_1_str", - "components": [ - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "exists_in_test2_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_2/exists_in_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_2/exists_in_2.vtl deleted file mode 100644 index 3744a5e0e..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_2/exists_in_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= exists_in(match_characters_test,exists_in_test2,true); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_3/exists_in_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_3/exists_in_3-spark.json deleted file mode 100644 index ec4858119..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_3/exists_in_3-spark.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "datasets": [ - { - "name": "match_characters_test", - "source": "spark:csv:match_characters_test.csv", - "structure": "match_characters_test_str" - }, - { - "name": "exists_in_1", - "source": "spark:csv:exists_in_1.csv", - "structure": "exists_in_1_str" - }, - { - "name": "exists_in_test2", - "source": "spark:csv:exists_in_test2.csv", - "structure": "exists_in_test2_str" - }, - { - "name": "expected", - "structure": "exists_in_3_str", - "source": "spark:csv:exists_in_3.csv" - } - ], - "structures": [ - { - "name": "exists_in_3_str", - "components": [ - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "match_characters_test_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "exists_in_1_str", - "components": [ - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "exists_in_test2_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_3/exists_in_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_3/exists_in_3.json deleted file mode 100644 index 72c764271..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_3/exists_in_3.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "datasets": [ - { - "name": "match_characters_test", - "source": "csv:match_characters_test.csv", - "structure": "match_characters_test_str" - }, - { - "name": "exists_in_1", - "source": "csv:exists_in_1.csv", - "structure": "exists_in_1_str" - }, - { - "name": "exists_in_test2", - "source": "csv:exists_in_test2.csv", - "structure": "exists_in_test2_str" - }, - { - "name": "expected", - "structure": "exists_in_3_str", - "source": "csv:exists_in_3.csv" - } - ], - "structures": [ - { - "name": "exists_in_3_str", - "components": [ - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "match_characters_test_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "exists_in_1_str", - "components": [ - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "exists_in_test2_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_3/exists_in_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_3/exists_in_3.vtl deleted file mode 100644 index e27d95495..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exists_in_3/exists_in_3.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= exists_in(match_characters_test,exists_in_test2,false); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp/exp-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp/exp-spark.json deleted file mode 100644 index 237b88106..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp/exp-spark.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "spark:csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "number_exp_1_str", - "source": "spark:csv:exp.csv" - } - ], - "structures": [ - { - "name": "number_exp_1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp/exp.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp/exp.json deleted file mode 100644 index 34d3bdff6..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp/exp.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "number_exp_1_str", - "source": "csv:exp.csv" - } - ], - "structures": [ - { - "name": "number_exp_1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp/exp.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp/exp.vtl deleted file mode 100644 index 4d80b5886..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp/exp.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := round(exp(number_test1), 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp_2/exp_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp_2/exp_2-spark.json deleted file mode 100644 index 212b2ac5a..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp_2/exp_2-spark.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "spark:csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "exp_2_str", - "source": "spark:csv:exp_2.csv" - } - ], - "structures": [ - { - "name": "exp_2_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "exp_3", - "role": "Measure" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "exp_3", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp_2/exp_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp_2/exp_2.json deleted file mode 100644 index c41708583..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp_2/exp_2.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "exp_2_str", - "source": "csv:exp_2.csv" - } - ], - "structures": [ - { - "name": "exp_2_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "exp_3", - "role": "Measure" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "exp_3", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp_2/exp_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp_2/exp_2.vtl deleted file mode 100644 index 772c36261..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/exp_2/exp_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= number_test7[calc Exp_3:= round(exp(Num_2), 7)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_1/fill_timeseries_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_1/fill_timeseries_1-spark.json deleted file mode 100644 index 15883e953..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_1/fill_timeseries_1-spark.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "fill_timeseries_test", - "source": "spark:csv:fill_timeseries_test.csv", - "structure": "fill_timeseries_test_str" - }, - { - "name": "expected", - "structure": "fill_timeseries_1_str", - "source": "spark:csv:fill_timeseries_1.csv" - } - ], - "structures": [ - { - "name": "fill_timeseries_test_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_date", - "role": "Identifier" - } - ] - }, - { - "name": "fill_timeseries_1_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_date", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "res4", - "domain": "boolean" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "id_date", - "domain": "date" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_1/fill_timeseries_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_1/fill_timeseries_1.json deleted file mode 100644 index 846c65b54..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_1/fill_timeseries_1.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "fill_timeseries_test", - "source": "csv:fill_timeseries_test.csv", - "structure": "fill_timeseries_test_str" - }, - { - "name": "expected", - "structure": "fill_timeseries_1_str", - "source": "csv:fill_timeseries_1.csv" - } - ], - "structures": [ - { - "name": "fill_timeseries_test_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_date", - "role": "Identifier" - } - ] - }, - { - "name": "fill_timeseries_1_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_date", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "res4", - "domain": "boolean" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "id_date", - "domain": "date" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_1/fill_timeseries_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_1/fill_timeseries_1.vtl deleted file mode 100644 index a81014154..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_1/fill_timeseries_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= fill_time_series(fill_timeseries_test); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_2/fill_timeseries_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_2/fill_timeseries_2-spark.json deleted file mode 100644 index d68f91c87..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_2/fill_timeseries_2-spark.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "fill_timeseries_test", - "source": "spark:csv:fill_timeseries_test.csv", - "structure": "fill_timeseries_test_str" - }, - { - "name": "expected", - "structure": "fill_timeseries_2_str", - "source": "spark:csv:fill_timeseries_2.csv" - } - ], - "structures": [ - { - "name": "fill_timeseries_test_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_date", - "role": "Identifier" - } - ] - }, - { - "name": "fill_timeseries_2_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_date", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "res4", - "domain": "boolean" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "id_date", - "domain": "date" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_2/fill_timeseries_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_2/fill_timeseries_2.json deleted file mode 100644 index 373a2db90..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_2/fill_timeseries_2.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "fill_timeseries_test", - "source": "csv:fill_timeseries_test.csv", - "structure": "fill_timeseries_test_str" - }, - { - "name": "expected", - "structure": "fill_timeseries_2_str", - "source": "csv:fill_timeseries_2.csv" - } - ], - "structures": [ - { - "name": "fill_timeseries_test_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_date", - "role": "Identifier" - } - ] - }, - { - "name": "fill_timeseries_2_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_date", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "res4", - "domain": "boolean" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "id_date", - "domain": "date" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_2/fill_timeseries_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_2/fill_timeseries_2.vtl deleted file mode 100644 index ae415f329..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/fill_timeseries_2/fill_timeseries_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= fill_time_series(fill_timeseries_test, single); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter/filter-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter/filter-spark.json deleted file mode 100644 index 2bacfdade..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter/filter-spark.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "spark:csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "clauses_filter_1_str", - "source": "spark:csv:filter.csv" - } - ], - "structures": [ - { - "name": "clauses_filter_1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "obs_agg", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "obs_agg", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter/filter.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter/filter.json deleted file mode 100644 index 0b0e1a2f4..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter/filter.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "clauses_filter_1_str", - "source": "csv:filter.csv" - } - ], - "structures": [ - { - "name": "clauses_filter_1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "obs_agg", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "obs_agg", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter/filter.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter/filter.vtl deleted file mode 100644 index 0ebc2955b..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter/filter.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := number_test1[filter id1 <> "a" and m1 > 2 and att1 <> "att_d"][aggr obs_agg := sum(m1) group by id1]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_1/filter_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_1/filter_1-spark.json deleted file mode 100644 index 4b99de5ab..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_1/filter_1-spark.json +++ /dev/null @@ -1,252 +0,0 @@ -{ - "datasets": [ - { - "name": "ecbexrusd_vtl", - "source": "spark:csv:ecbexrusd_vtl.csv", - "structure": "ecbexrusd_vtl_str" - }, - { - "name": "expected", - "structure": "filter_1_str", - "source": "spark:csv:filter_1.csv" - } - ], - "structures": [ - { - "name": "filter_1_str", - "components": [ - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - }, - { - "name": "ecbexrusd_vtl_str", - "components": [ - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "unit", - "domain": "string" - }, - { - "name": "decimals", - "domain": "string" - }, - { - "name": "currency_denom", - "domain": "string" - }, - { - "name": "source_agency", - "domain": "string" - }, - { - "name": "exr_suffix", - "domain": "string" - }, - { - "name": "collection", - "domain": "string" - }, - { - "name": "title", - "domain": "string" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "freq", - "domain": "string" - }, - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id", - "domain": "string" - }, - { - "name": "exr_type", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "time_format", - "domain": "string" - }, - { - "name": "obs_status", - "domain": "string" - }, - { - "name": "year", - "domain": "number" - }, - { - "name": "unit_mult", - "domain": "string" - }, - { - "name": "currency", - "domain": "string" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_1/filter_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_1/filter_1.json deleted file mode 100644 index 488165905..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_1/filter_1.json +++ /dev/null @@ -1,252 +0,0 @@ -{ - "datasets": [ - { - "name": "ecbexrusd_vtl", - "source": "csv:ecbexrusd_vtl.csv", - "structure": "ecbexrusd_vtl_str" - }, - { - "name": "expected", - "structure": "filter_1_str", - "source": "csv:filter_1.csv" - } - ], - "structures": [ - { - "name": "filter_1_str", - "components": [ - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - }, - { - "name": "ecbexrusd_vtl_str", - "components": [ - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "unit", - "domain": "string" - }, - { - "name": "decimals", - "domain": "string" - }, - { - "name": "currency_denom", - "domain": "string" - }, - { - "name": "source_agency", - "domain": "string" - }, - { - "name": "exr_suffix", - "domain": "string" - }, - { - "name": "collection", - "domain": "string" - }, - { - "name": "title", - "domain": "string" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "freq", - "domain": "string" - }, - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id", - "domain": "string" - }, - { - "name": "exr_type", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "time_format", - "domain": "string" - }, - { - "name": "obs_status", - "domain": "string" - }, - { - "name": "year", - "domain": "number" - }, - { - "name": "unit_mult", - "domain": "string" - }, - { - "name": "currency", - "domain": "string" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_1/filter_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_1/filter_1.vtl deleted file mode 100644 index 5ec2f12b7..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_1/filter_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= ecbexrusd_vtl[ filter Me_2 > 50 ]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_2/filter_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_2/filter_2-spark.json deleted file mode 100644 index 193fed84b..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_2/filter_2-spark.json +++ /dev/null @@ -1,252 +0,0 @@ -{ - "datasets": [ - { - "name": "ecbexrusd_vtl", - "source": "spark:csv:ecbexrusd_vtl.csv", - "structure": "ecbexrusd_vtl_str" - }, - { - "name": "expected", - "structure": "filter_2_str", - "source": "spark:csv:filter_2.csv" - } - ], - "structures": [ - { - "name": "filter_2_str", - "components": [ - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - }, - { - "name": "ecbexrusd_vtl_str", - "components": [ - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "unit", - "domain": "string" - }, - { - "name": "decimals", - "domain": "string" - }, - { - "name": "currency_denom", - "domain": "string" - }, - { - "name": "source_agency", - "domain": "string" - }, - { - "name": "exr_suffix", - "domain": "string" - }, - { - "name": "collection", - "domain": "string" - }, - { - "name": "title", - "domain": "string" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "freq", - "domain": "string" - }, - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id", - "domain": "string" - }, - { - "name": "exr_type", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "time_format", - "domain": "string" - }, - { - "name": "obs_status", - "domain": "string" - }, - { - "name": "year", - "domain": "number" - }, - { - "name": "unit_mult", - "domain": "string" - }, - { - "name": "currency", - "domain": "string" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_2/filter_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_2/filter_2.json deleted file mode 100644 index 6090289a1..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_2/filter_2.json +++ /dev/null @@ -1,252 +0,0 @@ -{ - "datasets": [ - { - "name": "ecbexrusd_vtl", - "source": "csv:ecbexrusd_vtl.csv", - "structure": "ecbexrusd_vtl_str" - }, - { - "name": "expected", - "structure": "filter_2_str", - "source": "csv:filter_2.csv" - } - ], - "structures": [ - { - "name": "filter_2_str", - "components": [ - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - }, - { - "name": "ecbexrusd_vtl_str", - "components": [ - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "unit", - "domain": "string" - }, - { - "name": "decimals", - "domain": "string" - }, - { - "name": "currency_denom", - "domain": "string" - }, - { - "name": "source_agency", - "domain": "string" - }, - { - "name": "exr_suffix", - "domain": "string" - }, - { - "name": "collection", - "domain": "string" - }, - { - "name": "title", - "domain": "string" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "freq", - "domain": "string" - }, - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id", - "domain": "string" - }, - { - "name": "exr_type", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "time_format", - "domain": "string" - }, - { - "name": "obs_status", - "domain": "string" - }, - { - "name": "year", - "domain": "number" - }, - { - "name": "unit_mult", - "domain": "string" - }, - { - "name": "currency", - "domain": "string" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_2/filter_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_2/filter_2.vtl deleted file mode 100644 index 14f2e6056..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/filter_2/filter_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= ecbexrusd_vtl[ filter Me_1 + Me_2 <= 50 ]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_1/first_value_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_1/first_value_1-spark.json deleted file mode 100644 index 1e6e8aed8..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_1/first_value_1-spark.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "datasets": [ - { - "name": "ratiotoreport", - "source": "spark:csv:ratiotoreport.csv", - "structure": "ratiotoreport_str" - }, - { - "name": "expected", - "structure": "first_value_1_str", - "source": "spark:csv:first_value_1.csv" - } - ], - "structures": [ - { - "name": "ratiotoreport_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "first_value_1_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_1/first_value_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_1/first_value_1.json deleted file mode 100644 index 88437ae3f..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_1/first_value_1.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "datasets": [ - { - "name": "ratiotoreport", - "source": "csv:ratiotoreport.csv", - "structure": "ratiotoreport_str" - }, - { - "name": "expected", - "structure": "first_value_1_str", - "source": "csv:first_value_1.csv" - } - ], - "structures": [ - { - "name": "ratiotoreport_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "first_value_1_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_1/first_value_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_1/first_value_1.vtl deleted file mode 100644 index fb45b3bbc..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_1/first_value_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= first_value(ratiotoreport over (partition by Id_1, Id_2 order by Id_3 data points between 1 preceding and 1 following)); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_2/first_value_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_2/first_value_2-spark.json deleted file mode 100644 index b8c0b0931..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_2/first_value_2-spark.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "datasets": [ - { - "name": "ratiotoreport", - "source": "spark:csv:ratiotoreport.csv", - "structure": "ratiotoreport_str" - }, - { - "name": "expected", - "structure": "first_value_2_str", - "source": "spark:csv:first_value_2.csv" - } - ], - "structures": [ - { - "name": "ratiotoreport_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "first_value_2_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "me_3", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_3", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_2/first_value_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_2/first_value_2.json deleted file mode 100644 index f841910ff..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_2/first_value_2.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "datasets": [ - { - "name": "ratiotoreport", - "source": "csv:ratiotoreport.csv", - "structure": "ratiotoreport_str" - }, - { - "name": "expected", - "structure": "first_value_2_str", - "source": "csv:first_value_2.csv" - } - ], - "structures": [ - { - "name": "ratiotoreport_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "first_value_2_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "me_3", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_3", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_2/first_value_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_2/first_value_2.vtl deleted file mode 100644 index 56dced169..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/first_value_2/first_value_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= ratiotoreport[calc Me_3 := first_value(Me_1 over (partition by Id_1, Id_2 order by Id_3))]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor/floor-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor/floor-spark.json deleted file mode 100644 index 19c0067cf..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor/floor-spark.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test3", - "source": "spark:csv:number_test3.csv", - "structure": "number_test3_str" - }, - { - "name": "expected", - "structure": "number_floor_1_str", - "source": "spark:csv:floor.csv" - } - ], - "structures": [ - { - "name": "number_test3_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "number_floor_1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor/floor.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor/floor.json deleted file mode 100644 index 1dbd9459c..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor/floor.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test3", - "source": "csv:number_test3.csv", - "structure": "number_test3_str" - }, - { - "name": "expected", - "structure": "number_floor_1_str", - "source": "csv:floor.csv" - } - ], - "structures": [ - { - "name": "number_test3_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "number_floor_1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor/floor.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor/floor.vtl deleted file mode 100644 index 019167977..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor/floor.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := ceil(number_test3); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor_1/floor_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor_1/floor_1-spark.json deleted file mode 100644 index de87f4ec9..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor_1/floor_1-spark.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "spark:csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "floor_1_str", - "source": "spark:csv:floor_1.csv" - } - ], - "structures": [ - { - "name": "floor_1_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor_1/floor_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor_1/floor_1.json deleted file mode 100644 index 97fdae76e..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor_1/floor_1.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "floor_1_str", - "source": "csv:floor_1.csv" - } - ], - "structures": [ - { - "name": "floor_1_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor_1/floor_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor_1/floor_1.vtl deleted file mode 100644 index b1c7f2b3c..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/floor_1/floor_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= floor(number_test7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_1/flow_to_stock_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_1/flow_to_stock_1-spark.json deleted file mode 100644 index 956350584..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_1/flow_to_stock_1-spark.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "flow_test", - "source": "spark:csv:flow_test.csv", - "structure": "flow_test_str" - }, - { - "name": "expected", - "structure": "flow_to_stock_1_str", - "source": "spark:csv:flow_to_stock_1.csv" - } - ], - "structures": [ - { - "name": "flow_to_stock_1_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_date", - "role": "Identifier" - } - ] - }, - { - "name": "flow_test_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_date", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "res4", - "domain": "boolean" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "id_date", - "domain": "date" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_1/flow_to_stock_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_1/flow_to_stock_1.json deleted file mode 100644 index b80703ec2..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_1/flow_to_stock_1.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "flow_test", - "source": "csv:flow_test.csv", - "structure": "flow_test_str" - }, - { - "name": "expected", - "structure": "flow_to_stock_1_str", - "source": "csv:flow_to_stock_1.csv" - } - ], - "structures": [ - { - "name": "flow_to_stock_1_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_date", - "role": "Identifier" - } - ] - }, - { - "name": "flow_test_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_date", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "res4", - "domain": "boolean" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "id_date", - "domain": "date" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_1/flow_to_stock_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_1/flow_to_stock_1.vtl deleted file mode 100644 index 8a2984d61..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_1/flow_to_stock_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= flow_to_stock(flow_test); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_2/flow_to_stock_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_2/flow_to_stock_2-spark.json deleted file mode 100644 index 40217796a..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_2/flow_to_stock_2-spark.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "flow_annual_test", - "source": "spark:csv:flow_annual_test.csv", - "structure": "flow_annual_test_str" - }, - { - "name": "expected", - "structure": "flow_to_stock_2_str", - "source": "spark:csv:flow_to_stock_2.csv" - } - ], - "structures": [ - { - "name": "flow_to_stock_2_str", - "components": [ - { - "name": "id_annual", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "flow_annual_test_str", - "components": [ - { - "name": "id_annual", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_annual", - "domain": "date" - }, - { - "name": "res4", - "domain": "boolean" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_2/flow_to_stock_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_2/flow_to_stock_2.json deleted file mode 100644 index 7742503ec..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_2/flow_to_stock_2.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "flow_annual_test", - "source": "csv:flow_annual_test.csv", - "structure": "flow_annual_test_str" - }, - { - "name": "expected", - "structure": "flow_to_stock_2_str", - "source": "csv:flow_to_stock_2.csv" - } - ], - "structures": [ - { - "name": "flow_to_stock_2_str", - "components": [ - { - "name": "id_annual", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "flow_annual_test_str", - "components": [ - { - "name": "id_annual", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_annual", - "domain": "date" - }, - { - "name": "res4", - "domain": "boolean" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_2/flow_to_stock_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_2/flow_to_stock_2.vtl deleted file mode 100644 index 202df7bca..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/flow_to_stock_2/flow_to_stock_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= flow_to_stock(flow_annual_test); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater/greater-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater/greater-spark.json deleted file mode 100644 index bd9f735d6..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater/greater-spark.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test4", - "source": "spark:csv:number_test4.csv", - "structure": "number_test4_str" - }, - { - "name": "number_test1", - "source": "spark:csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "greater_str", - "source": "spark:csv:greater.csv" - } - ], - "structures": [ - { - "name": "greater_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - } - ] - }, - { - "name": "number_test4_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater/greater.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater/greater.json deleted file mode 100644 index 7de170e97..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater/greater.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test4", - "source": "csv:number_test4.csv", - "structure": "number_test4_str" - }, - { - "name": "number_test1", - "source": "csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "greater_str", - "source": "csv:greater.csv" - } - ], - "structures": [ - { - "name": "greater_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - } - ] - }, - { - "name": "number_test4_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater/greater.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater/greater.vtl deleted file mode 100644 index bf6fdaeae..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater/greater.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := number_test1 > number_test4; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_1/greater_than_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_1/greater_than_1-spark.json deleted file mode 100644 index 29fc6675f..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_1/greater_than_1-spark.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "datasets": [ - { - "name": "gr_1", - "source": "spark:csv:gr_1.csv", - "structure": "gr_1_str" - }, - { - "name": "dataset_comparison_test2", - "source": "spark:csv:dataset_comparison_test2.csv", - "structure": "dataset_comparison_test2_str" - }, - { - "name": "dataset_comparison_test1", - "source": "spark:csv:dataset_comparison_test1.csv", - "structure": "dataset_comparison_test1_str" - }, - { - "name": "expected", - "structure": "greater_than_1_str", - "source": "spark:csv:greater_than_1.csv" - } - ], - "structures": [ - { - "name": "gr_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "greater_than_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "dataset_comparison_test2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "dataset_comparison_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_1/greater_than_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_1/greater_than_1.json deleted file mode 100644 index 9ed2488ae..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_1/greater_than_1.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "datasets": [ - { - "name": "gr_1", - "source": "csv:gr_1.csv", - "structure": "gr_1_str" - }, - { - "name": "dataset_comparison_test2", - "source": "csv:dataset_comparison_test2.csv", - "structure": "dataset_comparison_test2_str" - }, - { - "name": "dataset_comparison_test1", - "source": "csv:dataset_comparison_test1.csv", - "structure": "dataset_comparison_test1_str" - }, - { - "name": "expected", - "structure": "greater_than_1_str", - "source": "csv:greater_than_1.csv" - } - ], - "structures": [ - { - "name": "gr_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "greater_than_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "dataset_comparison_test2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "dataset_comparison_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_1/greater_than_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_1/greater_than_1.vtl deleted file mode 100644 index e9fe8b291..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_1/greater_than_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= dataset_comparison_test1>dataset_comparison_test2; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_2/greater_than_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_2/greater_than_2-spark.json deleted file mode 100644 index cd8da0430..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_2/greater_than_2-spark.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "datasets": [ - { - "name": "dataset_comparison_test2", - "source": "spark:csv:dataset_comparison_test2.csv", - "structure": "dataset_comparison_test2_str" - }, - { - "name": "dataset_comparison_test1", - "source": "spark:csv:dataset_comparison_test1.csv", - "structure": "dataset_comparison_test1_str" - }, - { - "name": "expected", - "structure": "gr_2_str", - "source": "spark:csv:greater_than_2.csv" - } - ], - "structures": [ - { - "name": "gr_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "gr", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "dataset_comparison_test2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "dataset_comparison_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "gr", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_2/greater_than_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_2/greater_than_2.json deleted file mode 100644 index 6490140de..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_2/greater_than_2.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "datasets": [ - { - "name": "dataset_comparison_test2", - "source": "csv:dataset_comparison_test2.csv", - "structure": "dataset_comparison_test2_str" - }, - { - "name": "dataset_comparison_test1", - "source": "csv:dataset_comparison_test1.csv", - "structure": "dataset_comparison_test1_str" - }, - { - "name": "expected", - "structure": "gr_2_str", - "source": "csv:greater_than_2.csv" - } - ], - "structures": [ - { - "name": "gr_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "gr", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "dataset_comparison_test2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "dataset_comparison_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "gr", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_2/greater_than_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_2/greater_than_2.vtl deleted file mode 100644 index 6cddeedd8..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greater_than_2/greater_than_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= dataset_comparison_test2[calc gr:= Num_1 >= 4]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greatereq/greatereq-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greatereq/greatereq-spark.json deleted file mode 100644 index 5b98289b8..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greatereq/greatereq-spark.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test4", - "source": "spark:csv:number_test4.csv", - "structure": "number_test4_str" - }, - { - "name": "number_test1", - "source": "spark:csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "greatereq_str", - "source": "spark:csv:greatereq.csv" - } - ], - "structures": [ - { - "name": "number_test4_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "greatereq_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greatereq/greatereq.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greatereq/greatereq.json deleted file mode 100644 index 419616d14..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greatereq/greatereq.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test4", - "source": "csv:number_test4.csv", - "structure": "number_test4_str" - }, - { - "name": "number_test1", - "source": "csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "greatereq_str", - "source": "csv:greatereq.csv" - } - ], - "structures": [ - { - "name": "number_test4_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "greatereq_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greatereq/greatereq.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greatereq/greatereq.vtl deleted file mode 100644 index 0c72c4516..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/greatereq/greatereq.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := number_test1 >= number_test4; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_1/if-then-else_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_1/if-then-else_1-spark.json deleted file mode 100644 index 168b9db41..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_1/if-then-else_1-spark.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "datasets": [ - { - "name": "if_test1", - "source": "spark:csv:if_test1.csv", - "structure": "if_test1_str" - }, - { - "name": "if_test2", - "source": "spark:csv:if_test2.csv", - "structure": "if_test2_str" - }, - { - "name": "if_test3", - "source": "spark:csv:if_test3.csv", - "structure": "if_test3_str" - }, - { - "name": "expected", - "structure": "if_1_str", - "source": "spark:csv:if-then-else_1.csv" - } - ], - "structures": [ - { - "name": "if_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "if_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "if_test2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "if_test3_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_1/if-then-else_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_1/if-then-else_1.json deleted file mode 100644 index 584ff3ef4..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_1/if-then-else_1.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "datasets": [ - { - "name": "if_test1", - "source": "csv:if_test1.csv", - "structure": "if_test1_str" - }, - { - "name": "if_test2", - "source": "csv:if_test2.csv", - "structure": "if_test2_str" - }, - { - "name": "if_test3", - "source": "csv:if_test3.csv", - "structure": "if_test3_str" - }, - { - "name": "expected", - "structure": "if_1_str", - "source": "csv:if-then-else_1.csv" - } - ], - "structures": [ - { - "name": "if_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "if_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "if_test2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "if_test3_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_1/if-then-else_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_1/if-then-else_1.vtl deleted file mode 100644 index 31cd4a1e4..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_1/if-then-else_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= if (if_test1#Id_4 = "F") then if_test2 else if_test3; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_2/if-then-else_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_2/if-then-else_2-spark.json deleted file mode 100644 index 8bd68fdf6..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_2/if-then-else_2-spark.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "datasets": [ - { - "name": "if_test1", - "source": "spark:csv:if_test1.csv", - "structure": "if_test1_str" - }, - { - "name": "expected", - "structure": "if_2_str", - "source": "spark:csv:if-then-else_2.csv" - } - ], - "structures": [ - { - "name": "if_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "if_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_2/if-then-else_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_2/if-then-else_2.json deleted file mode 100644 index 36ee22dce..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_2/if-then-else_2.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "datasets": [ - { - "name": "if_test1", - "source": "csv:if_test1.csv", - "structure": "if_test1_str" - }, - { - "name": "expected", - "structure": "if_2_str", - "source": "csv:if-then-else_2.csv" - } - ], - "structures": [ - { - "name": "if_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "if_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_2/if-then-else_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_2/if-then-else_2.vtl deleted file mode 100644 index 8c789ca07..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/if-then-else_2/if-then-else_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= if_test1[calc Me_2 := if (Id_4 = "F") then Me_1/1000 else 0]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/intersection/intersection-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/intersection/intersection-spark.json deleted file mode 100644 index 8336fa2de..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/intersection/intersection-spark.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "datasets": [ - { - "name": "intersection_test1", - "source": "spark:csv:intersection_test1.csv", - "structure": "intersection_test1_str" - }, - { - "name": "intersection_test2", - "source": "spark:csv:intersection_test2.csv", - "structure": "intersection_test2_str" - }, - { - "name": "expected", - "structure": "intersection_1_str", - "source": "spark:csv:intersection.csv" - } - ], - "structures": [ - { - "name": "intersection_1_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "edf2", - "role": "Measure" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - }, - { - "name": "edf3", - "role": "Measure" - }, - { - "name": "quality_status", - "role": "Attribute" - } - ] - }, - { - "name": "intersection_test1_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "edf2", - "role": "Measure" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - }, - { - "name": "edf3", - "role": "Measure" - }, - { - "name": "quality_status", - "role": "Attribute" - } - ] - }, - { - "name": "intersection_test2_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "edf2", - "role": "Measure" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - }, - { - "name": "edf3", - "role": "Measure" - }, - { - "name": "quality_status", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "quality_status", - "domain": "string" - }, - { - "name": "edfdate", - "domain": "date" - }, - { - "name": "edf2", - "domain": "number" - }, - { - "name": "edf3", - "domain": "number" - }, - { - "name": "edf1", - "domain": "number" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "mkmvid", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/intersection/intersection.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/intersection/intersection.json deleted file mode 100644 index 9b9f438e6..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/intersection/intersection.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "datasets": [ - { - "name": "intersection_test1", - "source": "csv:intersection_test1.csv", - "structure": "intersection_test1_str" - }, - { - "name": "intersection_test2", - "source": "csv:intersection_test2.csv", - "structure": "intersection_test2_str" - }, - { - "name": "expected", - "structure": "intersection_1_str", - "source": "csv:intersection.csv" - } - ], - "structures": [ - { - "name": "intersection_1_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "edf2", - "role": "Measure" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - }, - { - "name": "edf3", - "role": "Measure" - }, - { - "name": "quality_status", - "role": "Attribute" - } - ] - }, - { - "name": "intersection_test1_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "edf2", - "role": "Measure" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - }, - { - "name": "edf3", - "role": "Measure" - }, - { - "name": "quality_status", - "role": "Attribute" - } - ] - }, - { - "name": "intersection_test2_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "edf2", - "role": "Measure" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - }, - { - "name": "edf3", - "role": "Measure" - }, - { - "name": "quality_status", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "quality_status", - "domain": "string" - }, - { - "name": "edfdate", - "domain": "date" - }, - { - "name": "edf2", - "domain": "number" - }, - { - "name": "edf3", - "domain": "number" - }, - { - "name": "edf1", - "domain": "number" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "mkmvid", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/intersection/intersection.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/intersection/intersection.vtl deleted file mode 100644 index bef0a1526..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/intersection/intersection.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= intersect(intersection_test1,intersection_test2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_1/is_null_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_1/is_null_1-spark.json deleted file mode 100644 index e58f39c4d..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_1/is_null_1-spark.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "datasets": [ - { - "name": "isnull_1", - "source": "spark:csv:isnull_1.csv", - "structure": "isnull_1_str" - }, - { - "name": "isnull_test1", - "source": "spark:csv:isnull_test1.csv", - "structure": "isnull_test1_str" - }, - { - "name": "expected", - "structure": "is_null_1_str", - "source": "spark:csv:is_null_1.csv" - } - ], - "structures": [ - { - "name": "is_null_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "isnull_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "isnull_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_1/is_null_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_1/is_null_1.json deleted file mode 100644 index ea43be042..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_1/is_null_1.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "datasets": [ - { - "name": "isnull_1", - "source": "csv:isnull_1.csv", - "structure": "isnull_1_str" - }, - { - "name": "isnull_test1", - "source": "csv:isnull_test1.csv", - "structure": "isnull_test1_str" - }, - { - "name": "expected", - "structure": "is_null_1_str", - "source": "csv:is_null_1.csv" - } - ], - "structures": [ - { - "name": "is_null_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "isnull_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "isnull_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_1/is_null_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_1/is_null_1.vtl deleted file mode 100644 index ce3bc9eb9..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_1/is_null_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= isnull(isnull_test1); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_2/is_null_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_2/is_null_2-spark.json deleted file mode 100644 index 8e7afb63c..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_2/is_null_2-spark.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "datasets": [ - { - "name": "isnull_test1", - "source": "spark:csv:isnull_test1.csv", - "structure": "isnull_test1_str" - }, - { - "name": "expected", - "structure": "isnull_2_str", - "source": "spark:csv:is_null_2.csv" - } - ], - "structures": [ - { - "name": "isnull_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "isnull_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "isnl", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "isnl", - "domain": "boolean" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_2/is_null_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_2/is_null_2.json deleted file mode 100644 index 4c12d8267..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_2/is_null_2.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "datasets": [ - { - "name": "isnull_test1", - "source": "csv:isnull_test1.csv", - "structure": "isnull_test1_str" - }, - { - "name": "expected", - "structure": "isnull_2_str", - "source": "csv:is_null_2.csv" - } - ], - "structures": [ - { - "name": "isnull_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "isnull_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "isnl", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "isnl", - "domain": "boolean" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_2/is_null_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_2/is_null_2.vtl deleted file mode 100644 index 9ee7c4d4b..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/is_null_2/is_null_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= isnull_test1[ calc Isnl := isnull(Me_1)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep/keep-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep/keep-spark.json deleted file mode 100644 index 84f426cf0..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep/keep-spark.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test6", - "source": "spark:csv:number_test6.csv", - "structure": "number_test6_str" - }, - { - "name": "expected", - "structure": "clauses_keep_1_str", - "source": "spark:csv:keep.csv" - } - ], - "structures": [ - { - "name": "number_test6_str", - "components": [ - { - "name": "m2", - "role": "Measure" - }, - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "id2", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - }, - { - "name": "clauses_keep_1_str", - "components": [ - { - "name": "m2", - "role": "Measure" - }, - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "id2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "m2", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "id2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep/keep.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep/keep.json deleted file mode 100644 index ae4ddcff2..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep/keep.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test6", - "source": "csv:number_test6.csv", - "structure": "number_test6_str" - }, - { - "name": "expected", - "structure": "clauses_keep_1_str", - "source": "csv:keep.csv" - } - ], - "structures": [ - { - "name": "number_test6_str", - "components": [ - { - "name": "m2", - "role": "Measure" - }, - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "id2", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - }, - { - "name": "clauses_keep_1_str", - "components": [ - { - "name": "m2", - "role": "Measure" - }, - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "id2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "m2", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "id2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep/keep.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep/keep.vtl deleted file mode 100644 index e32da6fce..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep/keep.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := number_test6[keep m2]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep_1/keep_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep_1/keep_1-spark.json deleted file mode 100644 index b43f3cd80..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep_1/keep_1-spark.json +++ /dev/null @@ -1,196 +0,0 @@ -{ - "datasets": [ - { - "name": "ecbexrusd_vtl", - "source": "spark:csv:ecbexrusd_vtl.csv", - "structure": "ecbexrusd_vtl_str" - }, - { - "name": "expected", - "structure": "keep_str", - "source": "spark:csv:keep_1.csv" - } - ], - "structures": [ - { - "name": "keep_str", - "components": [ - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "year", - "role": "Identifier" - } - ] - }, - { - "name": "ecbexrusd_vtl_str", - "components": [ - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "unit", - "domain": "string" - }, - { - "name": "decimals", - "domain": "string" - }, - { - "name": "currency_denom", - "domain": "string" - }, - { - "name": "source_agency", - "domain": "string" - }, - { - "name": "exr_suffix", - "domain": "string" - }, - { - "name": "collection", - "domain": "string" - }, - { - "name": "title", - "domain": "string" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "freq", - "domain": "string" - }, - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id", - "domain": "string" - }, - { - "name": "exr_type", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "time_format", - "domain": "string" - }, - { - "name": "obs_status", - "domain": "string" - }, - { - "name": "year", - "domain": "number" - }, - { - "name": "unit_mult", - "domain": "string" - }, - { - "name": "currency", - "domain": "string" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep_1/keep_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep_1/keep_1.json deleted file mode 100644 index d778fa11f..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep_1/keep_1.json +++ /dev/null @@ -1,196 +0,0 @@ -{ - "datasets": [ - { - "name": "ecbexrusd_vtl", - "source": "csv:ecbexrusd_vtl.csv", - "structure": "ecbexrusd_vtl_str" - }, - { - "name": "expected", - "structure": "keep_str", - "source": "csv:keep_1.csv" - } - ], - "structures": [ - { - "name": "keep_str", - "components": [ - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "year", - "role": "Identifier" - } - ] - }, - { - "name": "ecbexrusd_vtl_str", - "components": [ - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "unit", - "domain": "string" - }, - { - "name": "decimals", - "domain": "string" - }, - { - "name": "currency_denom", - "domain": "string" - }, - { - "name": "source_agency", - "domain": "string" - }, - { - "name": "exr_suffix", - "domain": "string" - }, - { - "name": "collection", - "domain": "string" - }, - { - "name": "title", - "domain": "string" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "freq", - "domain": "string" - }, - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id", - "domain": "string" - }, - { - "name": "exr_type", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "time_format", - "domain": "string" - }, - { - "name": "obs_status", - "domain": "string" - }, - { - "name": "year", - "domain": "number" - }, - { - "name": "unit_mult", - "domain": "string" - }, - { - "name": "currency", - "domain": "string" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep_1/keep_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep_1/keep_1.vtl deleted file mode 100644 index ad6a80d2c..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/keep_1/keep_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= ecbexrusd_vtl[keep Me_1, FREQ]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_1/lag_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_1/lag_1-spark.json deleted file mode 100644 index 281f7d7ce..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_1/lag_1-spark.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "datasets": [ - { - "name": "lag_data", - "source": "spark:csv:lag.csv", - "structure": "lag_str" - }, - { - "name": "expected", - "structure": "lag_1_str", - "source": "spark:csv:lag_1.csv" - } - ], - "structures": [ - { - "name": "lag_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - } - ] - }, - { - "name": "lag_1_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "edfdate", - "domain": "date" - }, - { - "name": "edf1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "mkmvid", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_1/lag_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_1/lag_1.json deleted file mode 100644 index 159110472..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_1/lag_1.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "datasets": [ - { - "name": "lag_data", - "source": "csv:lag.csv", - "structure": "lag_str" - }, - { - "name": "expected", - "structure": "lag_1_str", - "source": "csv:lag_1.csv" - } - ], - "structures": [ - { - "name": "lag_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - } - ] - }, - { - "name": "lag_1_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "edfdate", - "domain": "date" - }, - { - "name": "edf1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "mkmvid", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_1/lag_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_1/lag_1.vtl deleted file mode 100644 index 8f191e495..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_1/lag_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= lag(lag_data, 2 over (partition by mkmvid order by edfdate)); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_2/lag_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_2/lag_2-spark.json deleted file mode 100644 index b073fcdb3..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_2/lag_2-spark.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "lag_data", - "source": "spark:csv:lag.csv", - "structure": "lag_str" - }, - { - "name": "expected", - "structure": "lag_2_str", - "source": "spark:csv:lag_2.csv" - } - ], - "structures": [ - { - "name": "lag_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - } - ] - }, - { - "name": "lag_2_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - }, - { - "name": "previous", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "previous", - "domain": "number" - }, - { - "name": "edfdate", - "domain": "date" - }, - { - "name": "edf1", - "domain": "number" - }, - { - "name": "mkmvid", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_2/lag_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_2/lag_2.json deleted file mode 100644 index 9495f2974..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_2/lag_2.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "lag_data", - "source": "csv:lag.csv", - "structure": "lag_str" - }, - { - "name": "expected", - "structure": "lag_2_str", - "source": "csv:lag_2.csv" - } - ], - "structures": [ - { - "name": "lag_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - } - ] - }, - { - "name": "lag_2_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - }, - { - "name": "previous", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "previous", - "domain": "number" - }, - { - "name": "edfdate", - "domain": "date" - }, - { - "name": "edf1", - "domain": "number" - }, - { - "name": "mkmvid", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_2/lag_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_2/lag_2.vtl deleted file mode 100644 index b42376ecd..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lag_2/lag_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= lag_data[calc previous := lag(edf1, 1 over (partition by mkmvid order by edfdate))]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_1/last_value_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_1/last_value_1-spark.json deleted file mode 100644 index a4654e0d1..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_1/last_value_1-spark.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "datasets": [ - { - "name": "ratiotoreport", - "source": "spark:csv:ratiotoreport.csv", - "structure": "ratiotoreport_str" - }, - { - "name": "expected", - "structure": "last_value_1_str", - "source": "spark:csv:last_value_1.csv" - } - ], - "structures": [ - { - "name": "ratiotoreport_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "last_value_1_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_1/last_value_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_1/last_value_1.json deleted file mode 100644 index 45d377aeb..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_1/last_value_1.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "datasets": [ - { - "name": "ratiotoreport", - "source": "csv:ratiotoreport.csv", - "structure": "ratiotoreport_str" - }, - { - "name": "expected", - "structure": "last_value_1_str", - "source": "csv:last_value_1.csv" - } - ], - "structures": [ - { - "name": "ratiotoreport_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "last_value_1_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_1/last_value_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_1/last_value_1.vtl deleted file mode 100644 index 634459da4..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_1/last_value_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= last_value(ratiotoreport over (partition by Id_1, Id_2 order by Id_3 data points between 1 preceding and 1 following)); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_2/last_value_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_2/last_value_2-spark.json deleted file mode 100644 index 515d1c408..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_2/last_value_2-spark.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "datasets": [ - { - "name": "ratiotoreport", - "source": "spark:csv:ratiotoreport.csv", - "structure": "ratiotoreport_str" - }, - { - "name": "expected", - "structure": "last_value_2_str", - "source": "spark:csv:last_value_2.csv" - } - ], - "structures": [ - { - "name": "ratiotoreport_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "last_value_2_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "me_3", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_3", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_2/last_value_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_2/last_value_2.json deleted file mode 100644 index 185c2c0c6..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_2/last_value_2.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "datasets": [ - { - "name": "ratiotoreport", - "source": "csv:ratiotoreport.csv", - "structure": "ratiotoreport_str" - }, - { - "name": "expected", - "structure": "last_value_2_str", - "source": "csv:last_value_2.csv" - } - ], - "structures": [ - { - "name": "ratiotoreport_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "last_value_2_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "me_3", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_3", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_2/last_value_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_2/last_value_2.vtl deleted file mode 100644 index 9cf8eb178..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/last_value_2/last_value_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= ratiotoreport[calc Me_3 := last_value(Me_1 over (partition by Id_1, Id_2 order by Id_3))]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_1/lead_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_1/lead_1-spark.json deleted file mode 100644 index 5135d3e8b..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_1/lead_1-spark.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "datasets": [ - { - "name": "lag_data", - "source": "spark:csv:lag.csv", - "structure": "lag_str" - }, - { - "name": "expected", - "structure": "lead_1_str", - "source": "spark:csv:lead_1.csv" - } - ], - "structures": [ - { - "name": "lag_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - } - ] - }, - { - "name": "lead_1_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "edfdate", - "domain": "date" - }, - { - "name": "edf1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "mkmvid", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_1/lead_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_1/lead_1.json deleted file mode 100644 index 1284a6b35..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_1/lead_1.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "datasets": [ - { - "name": "lag_data", - "source": "csv:lag.csv", - "structure": "lag_str" - }, - { - "name": "expected", - "structure": "lead_1_str", - "source": "csv:lead_1.csv" - } - ], - "structures": [ - { - "name": "lag_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - } - ] - }, - { - "name": "lead_1_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "edfdate", - "domain": "date" - }, - { - "name": "edf1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "mkmvid", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_1/lead_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_1/lead_1.vtl deleted file mode 100644 index 7e6b03520..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_1/lead_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= lead(lag_data, 1 over (partition by mkmvid order by edfdate)); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_2/lead_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_2/lead_2-spark.json deleted file mode 100644 index 026ade31c..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_2/lead_2-spark.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "datasets": [ - { - "name": "lag_data", - "source": "spark:csv:lag.csv", - "structure": "lag_str" - }, - { - "name": "expected", - "structure": "lead_2_str", - "source": "spark:csv:lead_2.csv" - } - ], - "structures": [ - { - "name": "lag_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - } - ] - }, - { - "name": "lead_2_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "next", - "role": "Measure" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "next", - "domain": "number" - }, - { - "name": "edfdate", - "domain": "date" - }, - { - "name": "edf1", - "domain": "number" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "mkmvid", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_2/lead_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_2/lead_2.json deleted file mode 100644 index bc65228cb..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_2/lead_2.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "datasets": [ - { - "name": "lag_data", - "source": "csv:lag.csv", - "structure": "lag_str" - }, - { - "name": "expected", - "structure": "lead_2_str", - "source": "csv:lead_2.csv" - } - ], - "structures": [ - { - "name": "lag_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - } - ] - }, - { - "name": "lead_2_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "next", - "role": "Measure" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "next", - "domain": "number" - }, - { - "name": "edfdate", - "domain": "date" - }, - { - "name": "edf1", - "domain": "number" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "mkmvid", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_2/lead_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_2/lead_2.vtl deleted file mode 100644 index 4130ac677..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lead_2/lead_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= fill_time_series(lag_data, single)[calc next := lead(edf1, 1 over (partition by mkmvid order by edfdate))]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/less_than_1/less_than_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/less_than_1/less_than_1-spark.json deleted file mode 100644 index b10d6b4b3..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/less_than_1/less_than_1-spark.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "datasets": [ - { - "name": "dataset_comparison_test2", - "source": "spark:csv:dataset_comparison_test2.csv", - "structure": "dataset_comparison_test2_str" - }, - { - "name": "dataset_comparison_test1", - "source": "spark:csv:dataset_comparison_test1.csv", - "structure": "dataset_comparison_test1_str" - }, - { - "name": "expected", - "structure": "less_than_1_str", - "source": "spark:csv:less_than_1.csv" - } - ], - "structures": [ - { - "name": "dataset_comparison_test2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "less_than_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "le", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "dataset_comparison_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "le", - "domain": "boolean" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/less_than_1/less_than_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/less_than_1/less_than_1.json deleted file mode 100644 index 67784e457..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/less_than_1/less_than_1.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "datasets": [ - { - "name": "dataset_comparison_test2", - "source": "csv:dataset_comparison_test2.csv", - "structure": "dataset_comparison_test2_str" - }, - { - "name": "dataset_comparison_test1", - "source": "csv:dataset_comparison_test1.csv", - "structure": "dataset_comparison_test1_str" - }, - { - "name": "expected", - "structure": "less_than_1_str", - "source": "csv:less_than_1.csv" - } - ], - "structures": [ - { - "name": "dataset_comparison_test2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "less_than_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "le", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "dataset_comparison_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "le", - "domain": "boolean" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/less_than_1/less_than_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/less_than_1/less_than_1.vtl deleted file mode 100644 index a6839bcb6..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/less_than_1/less_than_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= dataset_comparison_test2[calc le:= Num_1 < 2]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lesser/lesser-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lesser/lesser-spark.json deleted file mode 100644 index bd95c69f0..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lesser/lesser-spark.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test4", - "source": "spark:csv:number_test4.csv", - "structure": "number_test4_str" - }, - { - "name": "number_test1", - "source": "spark:csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "lesser_str", - "source": "spark:csv:lesser.csv" - } - ], - "structures": [ - { - "name": "number_test4_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - }, - { - "name": "lesser_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - } - ] - } ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lesser/lesser.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lesser/lesser.json deleted file mode 100644 index ff22fe70e..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lesser/lesser.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test4", - "source": "csv:number_test4.csv", - "structure": "number_test4_str" - }, - { - "name": "number_test1", - "source": "csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "lesser_str", - "source": "csv:lesser.csv" - } - ], - "structures": [ - { - "name": "number_test4_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - }, - { - "name": "lesser_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - } - ] - } ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lesser/lesser.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lesser/lesser.vtl deleted file mode 100644 index 216a0b5d2..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lesser/lesser.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := number_test1 < number_test4; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lessereq/lessereq-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lessereq/lessereq-spark.json deleted file mode 100644 index 14d821f73..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lessereq/lessereq-spark.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test4", - "source": "spark:csv:number_test4.csv", - "structure": "number_test4_str" - }, - { - "name": "number_test1", - "source": "spark:csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "lessereq_str", - "source": "spark:csv:lessereq.csv" - } - ], - "structures": [ - { - "name": "number_test4_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "lessereq_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lessereq/lessereq.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lessereq/lessereq.json deleted file mode 100644 index 996d27355..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lessereq/lessereq.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test4", - "source": "csv:number_test4.csv", - "structure": "number_test4_str" - }, - { - "name": "number_test1", - "source": "csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "lessereq_str", - "source": "csv:lessereq.csv" - } - ], - "structures": [ - { - "name": "number_test4_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "lessereq_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lessereq/lessereq.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lessereq/lessereq.vtl deleted file mode 100644 index cd30442ba..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/lessereq/lessereq.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := number_test1 <= number_test4; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln/ln-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln/ln-spark.json deleted file mode 100644 index c52150ebc..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln/ln-spark.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "spark:csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "ln_str", - "source": "spark:csv:ln.csv" - } - ], - "structures": [ - { - "name": "ln_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln/ln.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln/ln.json deleted file mode 100644 index 62a71d24c..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln/ln.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "ln_str", - "source": "csv:ln.csv" - } - ], - "structures": [ - { - "name": "ln_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln/ln.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln/ln.vtl deleted file mode 100644 index 22444d235..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln/ln.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := round(ln(number_test1),2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_1/ln_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_1/ln_1-spark.json deleted file mode 100644 index 818b0e123..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_1/ln_1-spark.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "spark:csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "ln_1_str", - "source": "spark:csv:ln_1.csv" - } - ], - "structures": [ - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "ln_1_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "integer" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_1/ln_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_1/ln_1.json deleted file mode 100644 index 125f2045d..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_1/ln_1.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "ln_1_str", - "source": "csv:ln_1.csv" - } - ], - "structures": [ - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "ln_1_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "integer" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_1/ln_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_1/ln_1.vtl deleted file mode 100644 index 572136574..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_1/ln_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= round(ln(number_test7), 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_2/ln_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_2/ln_2-spark.json deleted file mode 100644 index 98ef8f78d..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_2/ln_2-spark.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "spark:csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "ln_2_str", - "source": "spark:csv:ln_2.csv" - } - ], - "structures": [ - { - "name": "ln_2_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "ln_3", - "role": "Measure" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "ln_3", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_2/ln_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_2/ln_2.json deleted file mode 100644 index 45dc7e4fe..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_2/ln_2.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "ln_2_str", - "source": "csv:ln_2.csv" - } - ], - "structures": [ - { - "name": "ln_2_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "ln_3", - "role": "Measure" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "ln_3", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_2/ln_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_2/ln_2.vtl deleted file mode 100644 index 2fd75b521..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ln_2/ln_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= number_test7[calc Ln_3:= round(ln(Num_2), 7)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_1/log_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_1/log_1-spark.json deleted file mode 100644 index 88bfc9dd4..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_1/log_1-spark.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "spark:csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "log_1_str", - "source": "spark:csv:log_1.csv" - } - ], - "structures": [ - { - "name": "log_1_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "integer" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_1/log_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_1/log_1.json deleted file mode 100644 index 1286aa70d..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_1/log_1.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "log_1_str", - "source": "csv:log_1.csv" - } - ], - "structures": [ - { - "name": "log_1_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "integer" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_1/log_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_1/log_1.vtl deleted file mode 100644 index 0155c926c..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_1/log_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= round(log(number_test7, 2), 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_2/log_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_2/log_2-spark.json deleted file mode 100644 index 75bfcd739..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_2/log_2-spark.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "spark:csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "log_2_str", - "source": "spark:csv:log_2.csv" - } - ], - "structures": [ - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "log_2_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "log_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - }, - { - "name": "log_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "log_1", - "domain": "number" - }, - { - "name": "num_1", - "domain": "number" - }, - { - "name": "log_2", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_2/log_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_2/log_2.json deleted file mode 100644 index 4b68cd629..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_2/log_2.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "log_2_str", - "source": "csv:log_2.csv" - } - ], - "structures": [ - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "log_2_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "log_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - }, - { - "name": "log_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "log_1", - "domain": "number" - }, - { - "name": "num_1", - "domain": "number" - }, - { - "name": "log_2", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_2/log_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_2/log_2.vtl deleted file mode 100644 index fa680f3b5..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/log_2/log_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= number_test7[calc Log_1:= round(log(Num_1,100), 7), Log_2:= round(log(Num_2,100), 7)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_1/match_characters_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_1/match_characters_1-spark.json deleted file mode 100644 index 5cb21ba52..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_1/match_characters_1-spark.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "datasets": [ - { - "name": "match_characters_test", - "source": "spark:csv:match_characters_test.csv", - "structure": "match_characters_test_str" - }, - { - "name": "expected", - "structure": "match_characters_1_str", - "source": "spark:csv:match_characters_1.csv" - } - ], - "structures": [ - { - "name": "match_characters_test_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "match_characters_1_str", - "components": [ - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_1/match_characters_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_1/match_characters_1.json deleted file mode 100644 index da2a32737..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_1/match_characters_1.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "datasets": [ - { - "name": "match_characters_test", - "source": "csv:match_characters_test.csv", - "structure": "match_characters_test_str" - }, - { - "name": "expected", - "structure": "match_characters_1_str", - "source": "csv:match_characters_1.csv" - } - ], - "structures": [ - { - "name": "match_characters_test_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "match_characters_1_str", - "components": [ - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_1/match_characters_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_1/match_characters_1.vtl deleted file mode 100644 index 501a7479c..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_1/match_characters_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= match_characters(match_characters_test, "\b([A-Z]{2})((?![A-Z]{10}\b)[A-Z0-9]{10})\b"); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_2/match_characters_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_2/match_characters_2-spark.json deleted file mode 100644 index 39ebaa2c2..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_2/match_characters_2-spark.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "match_characters_test", - "source": "spark:csv:match_characters_test.csv", - "structure": "match_characters_test_str" - }, - { - "name": "expected", - "structure": "match_characters_2_str", - "source": "spark:csv:match_characters_2.csv" - } - ], - "structures": [ - { - "name": "match_characters_test_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "match_characters_2_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "is_isin", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "is_isin", - "domain": "boolean" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_2/match_characters_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_2/match_characters_2.json deleted file mode 100644 index 66afe5bf2..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_2/match_characters_2.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "match_characters_test", - "source": "csv:match_characters_test.csv", - "structure": "match_characters_test_str" - }, - { - "name": "expected", - "structure": "match_characters_2_str", - "source": "csv:match_characters_2.csv" - } - ], - "structures": [ - { - "name": "match_characters_test_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "match_characters_2_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "is_isin", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "is_isin", - "domain": "boolean" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_2/match_characters_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_2/match_characters_2.vtl deleted file mode 100644 index ab0072807..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/match_characters_2/match_characters_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= match_characters_test [ calc is_isin:= match_characters(Text_1, "\b([A-Z]{2})((?![A-Z]{10}\b)[A-Z0-9]{10})\b")]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/max/max-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/max/max-spark.json deleted file mode 100644 index 068c2659a..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/max/max-spark.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "ratiotoreport", - "source": "spark:csv:ratiotoreport.csv", - "structure": "ratiotoreport_str" - }, - { - "name": "expected", - "structure": "max_str", - "source": "spark:csv:max.csv" - } - ], - "structures": [ - { - "name": "ratiotoreport_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "max_str", - "components": [ - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/max/max.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/max/max.json deleted file mode 100644 index 73e9253e4..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/max/max.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "ratiotoreport", - "source": "csv:ratiotoreport.csv", - "structure": "ratiotoreport_str" - }, - { - "name": "expected", - "structure": "max_str", - "source": "csv:max.csv" - } - ], - "structures": [ - { - "name": "ratiotoreport_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "max_str", - "components": [ - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/max/max.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/max/max.vtl deleted file mode 100644 index 1b7c8c3a5..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/max/max.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= max(ratiotoreport group by Id_2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/median/median-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/median/median-spark.json deleted file mode 100644 index 91714b2b2..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/median/median-spark.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "median_data", - "source": "spark:csv:median_variance.csv", - "structure": "median_str" - }, - { - "name": "expected", - "structure": "median_1_str", - "source": "spark:csv:median.csv" - } - ], - "structures": [ - { - "name": "median_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "median_1_str", - "components": [ - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "integer" - }, - { - "name": "me_1", - "domain": "integer" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/median/median.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/median/median.json deleted file mode 100644 index 13fad44f5..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/median/median.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "median_data", - "source": "csv:median_variance.csv", - "structure": "median_str" - }, - { - "name": "expected", - "structure": "median_1_str", - "source": "csv:median.csv" - } - ], - "structures": [ - { - "name": "median_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "median_1_str", - "components": [ - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "integer" - }, - { - "name": "me_1", - "domain": "integer" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/median/median.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/median/median.vtl deleted file mode 100644 index 44f721c3a..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/median/median.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= median(median_data group by Id_2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/membership_1/membership_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/membership_1/membership_1-spark.json deleted file mode 100644 index 9cd54543b..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/membership_1/membership_1-spark.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "datasets": [ - { - "name": "gen_operators_test1", - "source": "spark:csv:gen_operators_test1.csv", - "structure": "gen_operators_test1_str" - }, - { - "name": "expected", - "structure": "membership_1_str", - "source": "spark:csv:membership_1.csv" - } - ], - "structures": [ - { - "name": "gen_operators_test1_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "membership_1_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "string_var", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "number" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - }, - { - "name": "string_var", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/membership_1/membership_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/membership_1/membership_1.json deleted file mode 100644 index 4e342c5cb..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/membership_1/membership_1.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "datasets": [ - { - "name": "gen_operators_test1", - "source": "csv:gen_operators_test1.csv", - "structure": "gen_operators_test1_str" - }, - { - "name": "expected", - "structure": "membership_1_str", - "source": "csv:membership_1.csv" - } - ], - "structures": [ - { - "name": "gen_operators_test1_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "membership_1_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "string_var", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "number" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - }, - { - "name": "string_var", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/membership_1/membership_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/membership_1/membership_1.vtl deleted file mode 100644 index 611543afa..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/membership_1/membership_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= inner_join(gen_operators_test1#Me_1 as a, gen_operators_test1#Id_1 as b); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/min/min-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/min/min-spark.json deleted file mode 100644 index cfd287e3a..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/min/min-spark.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "ratiotoreport", - "source": "spark:csv:ratiotoreport.csv", - "structure": "ratiotoreport_str" - }, - { - "name": "expected", - "structure": "min_str", - "source": "spark:csv:min.csv" - } - ], - "structures": [ - { - "name": "ratiotoreport_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "min_str", - "components": [ - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/min/min.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/min/min.json deleted file mode 100644 index 6a5d86e84..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/min/min.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "ratiotoreport", - "source": "csv:ratiotoreport.csv", - "structure": "ratiotoreport_str" - }, - { - "name": "expected", - "structure": "min_str", - "source": "csv:min.csv" - } - ], - "structures": [ - { - "name": "ratiotoreport_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "min_str", - "components": [ - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/min/min.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/min/min.vtl deleted file mode 100644 index 4410c524a..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/min/min.vtl +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -ds1:= ratiotoreport; -test_result:= min(ratiotoreport group by Id_2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/minus/minus-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/minus/minus-spark.json deleted file mode 100644 index d6d80661f..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/minus/minus-spark.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "spark:csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "minus_str", - "source": "spark:csv:minus.csv" - } - ], - "structures": [ - { - "name": "minus_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/minus/minus.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/minus/minus.json deleted file mode 100644 index f7c024037..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/minus/minus.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "minus_str", - "source": "csv:minus.csv" - } - ], - "structures": [ - { - "name": "minus_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/minus/minus.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/minus/minus.vtl deleted file mode 100644 index 0cacaf878..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/minus/minus.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := number_test1 - number_test1; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod/mod-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod/mod-spark.json deleted file mode 100644 index 9582870ea..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod/mod-spark.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "spark:csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "number_test2", - "source": "spark:csv:number_test2.csv", - "structure": "number_test2_str" - }, - { - "name": "expected", - "structure": "mod_str", - "source": "spark:csv:mod.csv" - } - ], - "structures": [ - { - "name": "mod_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - }, - { - "name": "number_test2_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod/mod.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod/mod.json deleted file mode 100644 index b307c0c33..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod/mod.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "number_test2", - "source": "csv:number_test2.csv", - "structure": "number_test2_str" - }, - { - "name": "expected", - "structure": "mod_str", - "source": "csv:mod.csv" - } - ], - "structures": [ - { - "name": "mod_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - }, - { - "name": "number_test2_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod/mod.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod/mod.vtl deleted file mode 100644 index 45f9dcf76..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod/mod.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := round(mod(number_test1, number_test2), 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_1/mod_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_1/mod_1-spark.json deleted file mode 100644 index 322bb6420..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_1/mod_1-spark.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "datasets": [ - { - "name": "mod_test", - "source": "spark:csv:mod_test.csv", - "structure": "mod_test_str" - }, - { - "name": "expected", - "structure": "mod_1_str", - "source": "spark:csv:mod_1.csv" - } - ], - "structures": [ - { - "name": "mod_test_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "mod_1_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "integer" - }, - { - "name": "time_period", - "domain": "integer" - }, - { - "name": "num_1", - "domain": "integer" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_1/mod_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_1/mod_1.json deleted file mode 100644 index 8acb36e58..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_1/mod_1.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "datasets": [ - { - "name": "mod_test", - "source": "csv:mod_test.csv", - "structure": "mod_test_str" - }, - { - "name": "expected", - "structure": "mod_1_str", - "source": "csv:mod_1.csv" - } - ], - "structures": [ - { - "name": "mod_test_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "mod_1_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "integer" - }, - { - "name": "time_period", - "domain": "integer" - }, - { - "name": "num_1", - "domain": "integer" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_1/mod_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_1/mod_1.vtl deleted file mode 100644 index b17dbef0e..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_1/mod_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= mod(mod_test, 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_2/mod_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_2/mod_2-spark.json deleted file mode 100644 index 7f48de3fd..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_2/mod_2-spark.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "mod_test", - "source": "spark:csv:mod_test.csv", - "structure": "mod_test_str" - }, - { - "name": "expected", - "structure": "mod_2_str", - "source": "spark:csv:mod_2.csv" - } - ], - "structures": [ - { - "name": "mod_test_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "mod_2_str", - "components": [ - { - "name": "mod_1", - "role": "Measure" - }, - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "integer" - }, - { - "name": "time_period", - "domain": "integer" - }, - { - "name": "mod_1", - "domain": "integer" - }, - { - "name": "num_1", - "domain": "integer" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_2/mod_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_2/mod_2.json deleted file mode 100644 index d60314b5f..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_2/mod_2.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "mod_test", - "source": "csv:mod_test.csv", - "structure": "mod_test_str" - }, - { - "name": "expected", - "structure": "mod_2_str", - "source": "csv:mod_2.csv" - } - ], - "structures": [ - { - "name": "mod_test_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "mod_2_str", - "components": [ - { - "name": "mod_1", - "role": "Measure" - }, - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "integer" - }, - { - "name": "time_period", - "domain": "integer" - }, - { - "name": "mod_1", - "domain": "integer" - }, - { - "name": "num_1", - "domain": "integer" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_2/mod_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_2/mod_2.vtl deleted file mode 100644 index 181a808b3..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mod_2/mod_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= mod_test[calc mod_1:= mod(Num_1, Num_2)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mult/mult-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mult/mult-spark.json deleted file mode 100644 index 59ad541ad..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mult/mult-spark.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "spark:csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "mult_str", - "source": "spark:csv:mult.csv" - } - ], - "structures": [ - { - "name": "mult_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mult/mult.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mult/mult.json deleted file mode 100644 index 55b2b60db..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mult/mult.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "mult_str", - "source": "csv:mult.csv" - } - ], - "structures": [ - { - "name": "mult_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mult/mult.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mult/mult.vtl deleted file mode 100644 index f6a9ba379..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/mult/mult.vtl +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ - test_result := round(number_test1 * number_test1, 2); - \ No newline at end of file diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_1/not_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_1/not_1-spark.json deleted file mode 100644 index 35482e93b..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_1/not_1-spark.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test4", - "source": "spark:csv:boolean_test4.csv", - "structure": "boolean_test4_str" - }, - { - "name": "expected", - "structure": "not_1_str", - "source": "spark:csv:not_1.csv" - } - ], - "structures": [ - { - "name": "not_1_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - }, - { - "name": "boolean_test4_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "number" - }, - { - "name": "id_4", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_1/not_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_1/not_1.json deleted file mode 100644 index 0605af36f..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_1/not_1.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test4", - "source": "csv:boolean_test4.csv", - "structure": "boolean_test4_str" - }, - { - "name": "expected", - "structure": "not_1_str", - "source": "csv:not_1.csv" - } - ], - "structures": [ - { - "name": "not_1_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - }, - { - "name": "boolean_test4_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "number" - }, - { - "name": "id_4", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_1/not_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_1/not_1.vtl deleted file mode 100644 index f9f2614fd..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_1/not_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= not boolean_test4; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_2/not_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_2/not_2-spark.json deleted file mode 100644 index 46a8649d9..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_2/not_2-spark.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test4", - "source": "spark:csv:boolean_test4.csv", - "structure": "boolean_test4_str" - }, - { - "name": "expected", - "structure": "not_2_str", - "source": "spark:csv:not_2.csv" - } - ], - "structures": [ - { - "name": "not_2_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_not", - "role": "Measure" - } - ] - }, - { - "name": "boolean_test4_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "me_not", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "number" - }, - { - "name": "id_4", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_2/not_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_2/not_2.json deleted file mode 100644 index 95478095f..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_2/not_2.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test4", - "source": "csv:boolean_test4.csv", - "structure": "boolean_test4_str" - }, - { - "name": "expected", - "structure": "not_2_str", - "source": "csv:not_2.csv" - } - ], - "structures": [ - { - "name": "not_2_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_not", - "role": "Measure" - } - ] - }, - { - "name": "boolean_test4_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "me_not", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "number" - }, - { - "name": "id_4", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_2/not_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_2/not_2.vtl deleted file mode 100644 index 2d0d6e047..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_2/not_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= boolean_test4[calc Me_not:= not Me_1]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_1/not_equal_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_1/not_equal_1-spark.json deleted file mode 100644 index 106206cae..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_1/not_equal_1-spark.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "datasets": [ - { - "name": "neq_1", - "source": "spark:csv:neq_1.csv", - "structure": "neq_1_str" - }, - { - "name": "dataset_comparison_test2", - "source": "spark:csv:dataset_comparison_test2.csv", - "structure": "dataset_comparison_test2_str" - }, - { - "name": "dataset_comparison_test1", - "source": "spark:csv:dataset_comparison_test1.csv", - "structure": "dataset_comparison_test1_str" - }, - { - "name": "expected", - "structure": "not_equal_1_str", - "source": "spark:csv:not_equal_1.csv" - } - ], - "structures": [ - { - "name": "not_equal_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "neq_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "dataset_comparison_test2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "dataset_comparison_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_1/not_equal_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_1/not_equal_1.json deleted file mode 100644 index 3a04ecd59..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_1/not_equal_1.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "datasets": [ - { - "name": "neq_1", - "source": "csv:neq_1.csv", - "structure": "neq_1_str" - }, - { - "name": "dataset_comparison_test2", - "source": "csv:dataset_comparison_test2.csv", - "structure": "dataset_comparison_test2_str" - }, - { - "name": "dataset_comparison_test1", - "source": "csv:dataset_comparison_test1.csv", - "structure": "dataset_comparison_test1_str" - }, - { - "name": "expected", - "structure": "not_equal_1_str", - "source": "csv:not_equal_1.csv" - } - ], - "structures": [ - { - "name": "not_equal_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "neq_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "dataset_comparison_test2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "dataset_comparison_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_1/not_equal_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_1/not_equal_1.vtl deleted file mode 100644 index 69f5d8b59..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_1/not_equal_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= dataset_comparison_test1<>dataset_comparison_test2; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_2/not_equal_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_2/not_equal_2-spark.json deleted file mode 100644 index 2fd05f1ab..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_2/not_equal_2-spark.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "datasets": [ - { - "name": "dataset_comparison_test2", - "source": "spark:csv:dataset_comparison_test2.csv", - "structure": "dataset_comparison_test2_str" - }, - { - "name": "dataset_comparison_test1", - "source": "spark:csv:dataset_comparison_test1.csv", - "structure": "dataset_comparison_test1_str" - }, - { - "name": "expected", - "structure": "not_equal_2_str", - "source": "spark:csv:not_equal_2.csv" - } - ], - "structures": [ - { - "name": "not_equal_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "neq", - "role": "Measure" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "dataset_comparison_test2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "dataset_comparison_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "neq", - "domain": "boolean" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_2/not_equal_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_2/not_equal_2.json deleted file mode 100644 index 907e24d54..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_2/not_equal_2.json +++ /dev/null @@ -1,130 +0,0 @@ -{ - "datasets": [ - { - "name": "dataset_comparison_test2", - "source": "csv:dataset_comparison_test2.csv", - "structure": "dataset_comparison_test2_str" - }, - { - "name": "dataset_comparison_test1", - "source": "csv:dataset_comparison_test1.csv", - "structure": "dataset_comparison_test1_str" - }, - { - "name": "expected", - "structure": "not_equal_2_str", - "source": "csv:not_equal_2.csv" - } - ], - "structures": [ - { - "name": "not_equal_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "neq", - "role": "Measure" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "dataset_comparison_test2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "dataset_comparison_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "neq", - "domain": "boolean" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_2/not_equal_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_2/not_equal_2.vtl deleted file mode 100644 index ae68a1a23..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_equal_2/not_equal_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= dataset_comparison_test1[calc neq:=Num_1<>4]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_xor/boolean_test6.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_xor/boolean_test6.csv deleted file mode 100644 index 222c45333..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_xor/boolean_test6.csv +++ /dev/null @@ -1,7 +0,0 @@ -id_1,id_2,id_3,id_4,me_1,me_2 -M,15,B,2013,FALSE,TRUE -M,64,B,2013,FALSE,FALSE -M,65,B,2013,FALSE, -F,15,U,2013,TRUE,TRUE -F,64,U,2013,TRUE,FALSE -F,65,U,2013,TRUE, diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_xor/not_xor-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_xor/not_xor-spark.json deleted file mode 100644 index 5398dc833..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_xor/not_xor-spark.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test6", - "source": "spark:csv:boolean_test6.csv", - "structure": "boolean_test6_str" - }, - { - "name": "expected", - "structure": "not_xor_str", - "source": "spark:csv:not_xor.csv" - } - ], - "structures": [ - { - "name": "not_xor_str", - "components": [ - { - "name": "bool_not", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "bool_xor", - "role": "Measure" - } - ] - }, - { - "name": "boolean_test6_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "bool_not", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "number" - }, - { - "name": "me_2", - "domain": "boolean" - }, - { - "name": "bool_xor", - "domain": "boolean" - }, - { - "name": "id_4", - "domain": "number" - }, - { - "name": "res1", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_xor/not_xor.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_xor/not_xor.csv deleted file mode 100644 index 72f8d595a..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_xor/not_xor.csv +++ /dev/null @@ -1,7 +0,0 @@ -id_1,id_2,id_3,id_4,me_1,me_2,bool_not,bool_xor -M,15,B,2013,FALSE,TRUE,FALSE,TRUE -M,64,B,2013,FALSE,FALSE,TRUE,FALSE -M,65,B,2013,FALSE,,, -F,15,U,2013,TRUE,TRUE,FALSE,FALSE -F,64,U,2013,TRUE,FALSE,TRUE,TRUE -F,65,U,2013,TRUE,,,TRUE diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_xor/not_xor.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_xor/not_xor.json deleted file mode 100644 index 5e144a343..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_xor/not_xor.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test6", - "source": "csv:boolean_test6.csv", - "structure": "boolean_test6_str" - }, - { - "name": "expected", - "structure": "not_xor_str", - "source": "csv:not_xor.csv" - } - ], - "structures": [ - { - "name": "not_xor_str", - "components": [ - { - "name": "bool_not", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "bool_xor", - "role": "Measure" - } - ] - }, - { - "name": "boolean_test6_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "bool_not", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "number" - }, - { - "name": "me_2", - "domain": "boolean" - }, - { - "name": "bool_xor", - "domain": "boolean" - }, - { - "name": "id_4", - "domain": "number" - }, - { - "name": "res1", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_xor/not_xor.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_xor/not_xor.vtl deleted file mode 100644 index 09d83fd76..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/not_xor/not_xor.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= boolean_test6[calc bool_not:= not Me_2, bool_xor:= Me_1 xor Me_2]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/notequal/notequal-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/notequal/notequal-spark.json deleted file mode 100644 index 41f256c0d..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/notequal/notequal-spark.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test4", - "source": "spark:csv:number_test4.csv", - "structure": "number_test4_str" - }, - { - "name": "number_test1", - "source": "spark:csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "notequal_str", - "source": "spark:csv:notequal.csv" - } - ], - "structures": [ - { - "name": "number_test4_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "notequal_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/notequal/notequal.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/notequal/notequal.json deleted file mode 100644 index a0af297f5..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/notequal/notequal.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test4", - "source": "csv:number_test4.csv", - "structure": "number_test4_str" - }, - { - "name": "number_test1", - "source": "csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "notequal_str", - "source": "csv:notequal.csv" - } - ], - "structures": [ - { - "name": "number_test4_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "notequal_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "bool_var", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/notequal/notequal.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/notequal/notequal.vtl deleted file mode 100644 index 9fa4a31fe..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/notequal/notequal.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := number_test1 <> number_test4; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_1/nvl_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_1/nvl_1-spark.json deleted file mode 100644 index b04a0c184..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_1/nvl_1-spark.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "nvl_test1", - "source": "spark:csv:nvl_test1.csv", - "structure": "nvl_test1_str" - }, - { - "name": "expected", - "structure": "nvl_1_str", - "source": "spark:csv:nvl_1.csv" - } - ], - "structures": [ - { - "name": "nvl_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "nvl_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_1/nvl_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_1/nvl_1.json deleted file mode 100644 index 47bd7561d..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_1/nvl_1.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "nvl_test1", - "source": "csv:nvl_test1.csv", - "structure": "nvl_test1_str" - }, - { - "name": "expected", - "structure": "nvl_1_str", - "source": "csv:nvl_1.csv" - } - ], - "structures": [ - { - "name": "nvl_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "nvl_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_1/nvl_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_1/nvl_1.vtl deleted file mode 100644 index c77668e29..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_1/nvl_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := nvl(nvl_test1, 0); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_2/nvl_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_2/nvl_2-spark.json deleted file mode 100644 index eb52bc4e0..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_2/nvl_2-spark.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "datasets": [ - { - "name": "nvl_test1", - "source": "spark:csv:nvl_test1.csv", - "structure": "nvl_test1_str" - }, - { - "name": "nvl_test2", - "source": "spark:csv:nvl_test2.csv", - "structure": "nvl_test2_str" - }, - { - "name": "expected", - "structure": "nvl_2_str", - "source": "spark:csv:nvl_2.csv" - } - ], - "structures": [ - { - "name": "nvl_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "nvl_test2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "nvl_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_2/nvl_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_2/nvl_2.json deleted file mode 100644 index f044560f6..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_2/nvl_2.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "datasets": [ - { - "name": "nvl_test1", - "source": "csv:nvl_test1.csv", - "structure": "nvl_test1_str" - }, - { - "name": "nvl_test2", - "source": "csv:nvl_test2.csv", - "structure": "nvl_test2_str" - }, - { - "name": "expected", - "structure": "nvl_2_str", - "source": "csv:nvl_2.csv" - } - ], - "structures": [ - { - "name": "nvl_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "nvl_test2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "nvl_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_2/nvl_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_2/nvl_2.vtl deleted file mode 100644 index faab25e2b..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_2/nvl_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := nvl(nvl_test1, nvl_test2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_3/nvl_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_3/nvl_3-spark.json deleted file mode 100644 index 7aff1bba9..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_3/nvl_3-spark.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "datasets": [ - { - "name": "nvl_test1", - "source": "spark:csv:nvl_test1.csv", - "structure": "nvl_test1_str" - }, - { - "name": "expected", - "structure": "nvl_3_str", - "source": "spark:csv:nvl_3.csv" - } - ], - "structures": [ - { - "name": "nvl_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "nvl_3_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "nullrepl", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "nullrepl", - "domain": "number" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_3/nvl_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_3/nvl_3.json deleted file mode 100644 index 5964e88ad..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_3/nvl_3.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "datasets": [ - { - "name": "nvl_test1", - "source": "csv:nvl_test1.csv", - "structure": "nvl_test1_str" - }, - { - "name": "expected", - "structure": "nvl_3_str", - "source": "csv:nvl_3.csv" - } - ], - "structures": [ - { - "name": "nvl_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "nvl_3_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "nullrepl", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "nullrepl", - "domain": "number" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_4", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_3/nvl_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_3/nvl_3.vtl deleted file mode 100644 index 881edf76e..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/nvl_3/nvl_3.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := nvl_test1[calc nullRepl:= nvl(Me_1,-999)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/op_with_calculated_scalar/op_with_calculated_scalar-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/op_with_calculated_scalar/op_with_calculated_scalar-spark.json deleted file mode 100644 index 9d6fe5c0b..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/op_with_calculated_scalar/op_with_calculated_scalar-spark.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "spark:csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "op_with_calculated_scalar_str", - "source": "spark:csv:op_with_calculated_scalar.csv" - } - ], - "structures": [ - { - "name": "op_with_calculated_scalar_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/op_with_calculated_scalar/op_with_calculated_scalar.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/op_with_calculated_scalar/op_with_calculated_scalar.json deleted file mode 100644 index 22c959b40..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/op_with_calculated_scalar/op_with_calculated_scalar.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "op_with_calculated_scalar_str", - "source": "csv:op_with_calculated_scalar.csv" - } - ], - "structures": [ - { - "name": "op_with_calculated_scalar_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/op_with_calculated_scalar/op_with_calculated_scalar.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/op_with_calculated_scalar/op_with_calculated_scalar.vtl deleted file mode 100644 index c28ef738d..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/op_with_calculated_scalar/op_with_calculated_scalar.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := number_test1 * sum(number_test1); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_1/or_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_1/or_1-spark.json deleted file mode 100644 index 03e1d2dd2..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_1/or_1-spark.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test5", - "source": "spark:csv:boolean_test5.csv", - "structure": "boolean_test5_str" - }, - { - "name": "boolean_test4", - "source": "spark:csv:boolean_test4.csv", - "structure": "boolean_test4_str" - }, - { - "name": "expected", - "structure": "or_1_str", - "source": "spark:csv:or_1.csv" - } - ], - "structures": [ - { - "name": "or_1_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - }, - { - "name": "boolean_test5_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - }, - { - "name": "boolean_test4_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "number" - }, - { - "name": "id_4", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_1/or_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_1/or_1.json deleted file mode 100644 index 5671cf3f6..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_1/or_1.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test5", - "source": "csv:boolean_test5.csv", - "structure": "boolean_test5_str" - }, - { - "name": "boolean_test4", - "source": "csv:boolean_test4.csv", - "structure": "boolean_test4_str" - }, - { - "name": "expected", - "structure": "or_1_str", - "source": "csv:or_1.csv" - } - ], - "structures": [ - { - "name": "or_1_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - }, - { - "name": "boolean_test5_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - }, - { - "name": "boolean_test4_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "number" - }, - { - "name": "id_4", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_1/or_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_1/or_1.vtl deleted file mode 100644 index a22dc87ce..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_1/or_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= boolean_test4 or boolean_test5; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_2/or_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_2/or_2-spark.json deleted file mode 100644 index 90d3dafa4..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_2/or_2-spark.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test4", - "source": "spark:csv:boolean_test4.csv", - "structure": "boolean_test4_str" - }, - { - "name": "expected", - "structure": "or_2_str", - "source": "spark:csv:or_2.csv" - } - ], - "structures": [ - { - "name": "or_2_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "orf", - "role": "Measure" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "ort", - "role": "Measure" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - }, - { - "name": "boolean_test4_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "ort", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "number" - }, - { - "name": "id_4", - "domain": "number" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "orf", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_2/or_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_2/or_2.json deleted file mode 100644 index a44272506..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_2/or_2.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test4", - "source": "csv:boolean_test4.csv", - "structure": "boolean_test4_str" - }, - { - "name": "expected", - "structure": "or_2_str", - "source": "csv:or_2.csv" - } - ], - "structures": [ - { - "name": "or_2_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "orf", - "role": "Measure" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "ort", - "role": "Measure" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - }, - { - "name": "boolean_test4_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "ort", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "number" - }, - { - "name": "id_4", - "domain": "number" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "orf", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_2/or_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_2/or_2.vtl deleted file mode 100644 index 94eaaebb6..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/or_2/or_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= boolean_test4[calc orT:= Me_1 or true, orF:= Me_1 or false]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_1/parentheses_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_1/parentheses_1-spark.json deleted file mode 100644 index db7aac5b8..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_1/parentheses_1-spark.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "datasets": [ - { - "name": "gen_operators_test1", - "source": "spark:csv:gen_operators_test1.csv", - "structure": "gen_operators_test1_str" - }, - { - "name": "expected", - "structure": "parentheses_1_str", - "source": "spark:csv:parentheses_1.csv" - } - ], - "structures": [ - { - "name": "gen_operators_test1_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "parentheses_1_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "num_2", - "domain": "number" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_1/parentheses_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_1/parentheses_1.json deleted file mode 100644 index d8c6da664..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_1/parentheses_1.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "datasets": [ - { - "name": "gen_operators_test1", - "source": "csv:gen_operators_test1.csv", - "structure": "gen_operators_test1_str" - }, - { - "name": "expected", - "structure": "parentheses_1_str", - "source": "csv:parentheses_1.csv" - } - ], - "structures": [ - { - "name": "gen_operators_test1_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "parentheses_1_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "num_2", - "domain": "number" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_1/parentheses_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_1/parentheses_1.vtl deleted file mode 100644 index 3b337ada9..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_1/parentheses_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= gen_operators_test1[ calc Num_2:= (2 + Num_1) * Num_1]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_2/parentheses_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_2/parentheses_2-spark.json deleted file mode 100644 index abe2ee1e1..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_2/parentheses_2-spark.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "gen_operators_test1", - "source": "spark:csv:gen_operators_test1.csv", - "structure": "gen_operators_test1_str" - }, - { - "name": "expected", - "structure": "parentheses_2_str", - "source": "spark:csv:parentheses_2.csv" - } - ], - "structures": [ - { - "name": "gen_operators_test1_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "parentheses_2_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "integer" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "integer" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_2/parentheses_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_2/parentheses_2.json deleted file mode 100644 index 825873d0a..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_2/parentheses_2.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "gen_operators_test1", - "source": "csv:gen_operators_test1.csv", - "structure": "gen_operators_test1_str" - }, - { - "name": "expected", - "structure": "parentheses_2_str", - "source": "csv:parentheses_2.csv" - } - ], - "structures": [ - { - "name": "gen_operators_test1_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "parentheses_2_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "integer" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "integer" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_2/parentheses_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_2/parentheses_2.vtl deleted file mode 100644 index 5e78d8e38..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/parentheses_2/parentheses_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= (2 + gen_operators_test1#num_1) * gen_operators_test1#num_1; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_1/pattern_location_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_1/pattern_location_1-spark.json deleted file mode 100644 index e431df57d..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_1/pattern_location_1-spark.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "datasets": [ - { - "name": "pattern_test", - "source": "spark:csv:pattern_test.csv", - "structure": "pattern_test_str" - }, - { - "name": "expected", - "structure": "pattern_location_1_str", - "source": "spark:csv:pattern_location_1.csv" - } - ], - "structures": [ - { - "name": "pattern_test_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "pattern_location_1_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "integer_var", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "integer_var", - "domain": "integer" - }, - { - "name": "id_3", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_1/pattern_location_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_1/pattern_location_1.json deleted file mode 100644 index ba29ca59f..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_1/pattern_location_1.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "datasets": [ - { - "name": "pattern_test", - "source": "csv:pattern_test.csv", - "structure": "pattern_test_str" - }, - { - "name": "expected", - "structure": "pattern_location_1_str", - "source": "csv:pattern_location_1.csv" - } - ], - "structures": [ - { - "name": "pattern_test_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "pattern_location_1_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "integer_var", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "integer_var", - "domain": "integer" - }, - { - "name": "id_3", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_1/pattern_location_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_1/pattern_location_1.vtl deleted file mode 100644 index 9dcd70bcb..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_1/pattern_location_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= instr(pattern_test,"a",_,3); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_2/pattern_location_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_2/pattern_location_2-spark.json deleted file mode 100644 index 98440fc19..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_2/pattern_location_2-spark.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "pattern_test", - "source": "spark:csv:pattern_test.csv", - "structure": "pattern_test_str" - }, - { - "name": "expected", - "structure": "pattern_location_2_str", - "source": "spark:csv:pattern_location_2.csv" - } - ], - "structures": [ - { - "name": "pattern_test_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "pattern_location_2_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "a_location", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "number" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "a_location", - "domain": "integer" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_2/pattern_location_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_2/pattern_location_2.json deleted file mode 100644 index 3fca03d5f..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_2/pattern_location_2.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "pattern_test", - "source": "csv:pattern_test.csv", - "structure": "pattern_test_str" - }, - { - "name": "expected", - "structure": "pattern_location_2_str", - "source": "csv:pattern_location_2.csv" - } - ], - "structures": [ - { - "name": "pattern_test_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "pattern_location_2_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "a_location", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "number" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "a_location", - "domain": "integer" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_2/pattern_location_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_2/pattern_location_2.vtl deleted file mode 100644 index 2625d4a20..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_location_2/pattern_location_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= pattern_test[calc a_location:= instr(Text_1,"a",_,3)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_1/pattern_replacement_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_1/pattern_replacement_1-spark.json deleted file mode 100644 index 4ab2adc36..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_1/pattern_replacement_1-spark.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "substring_test", - "source": "spark:csv:substring_test.csv", - "structure": "substring_test_str" - }, - { - "name": "expected", - "structure": "pattern_replacement_1_str", - "source": "spark:csv:pattern_replacement_1.csv" - } - ], - "structures": [ - { - "name": "substring_test_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "pattern_replacement_1_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_1/pattern_replacement_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_1/pattern_replacement_1.json deleted file mode 100644 index f031df58d..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_1/pattern_replacement_1.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "substring_test", - "source": "csv:substring_test.csv", - "structure": "substring_test_str" - }, - { - "name": "expected", - "structure": "pattern_replacement_1_str", - "source": "csv:pattern_replacement_1.csv" - } - ], - "structures": [ - { - "name": "substring_test_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "pattern_replacement_1_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_1/pattern_replacement_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_1/pattern_replacement_1.vtl deleted file mode 100644 index d7b30376d..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_1/pattern_replacement_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= replace(substring_test#Text_1,"lorem","LOREM"); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_2/pattern_replacement_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_2/pattern_replacement_2-spark.json deleted file mode 100644 index 07917691a..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_2/pattern_replacement_2-spark.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "substring_test", - "source": "spark:csv:substring_test.csv", - "structure": "substring_test_str" - }, - { - "name": "expected", - "structure": "pattern_replacement_2_str", - "source": "spark:csv:pattern_replacement_2.csv" - } - ], - "structures": [ - { - "name": "substring_test_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "pattern_replacement_2_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_2/pattern_replacement_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_2/pattern_replacement_2.json deleted file mode 100644 index 7f8521b34..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_2/pattern_replacement_2.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "substring_test", - "source": "csv:substring_test.csv", - "structure": "substring_test_str" - }, - { - "name": "expected", - "structure": "pattern_replacement_2_str", - "source": "csv:pattern_replacement_2.csv" - } - ], - "structures": [ - { - "name": "substring_test_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "pattern_replacement_2_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_2/pattern_replacement_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_2/pattern_replacement_2.vtl deleted file mode 100644 index ac680816f..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_2/pattern_replacement_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= replace(substring_test#Text_1,"^*","-"); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_3/pattern_replacement_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_3/pattern_replacement_3-spark.json deleted file mode 100644 index 56a2ab94b..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_3/pattern_replacement_3-spark.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "substring_test", - "source": "spark:csv:substring_test.csv", - "structure": "substring_test_str" - }, - { - "name": "expected", - "structure": "pattern_replacement_3_str", - "source": "spark:csv:pattern_replacement_3.csv" - } - ], - "structures": [ - { - "name": "pattern_replacement_3_str", - "components": [ - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "substring_test_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "num_1", - "domain": "number" - }, - { - "name": "text_2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_3/pattern_replacement_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_3/pattern_replacement_3.json deleted file mode 100644 index dfeea16b3..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_3/pattern_replacement_3.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "substring_test", - "source": "csv:substring_test.csv", - "structure": "substring_test_str" - }, - { - "name": "expected", - "structure": "pattern_replacement_3_str", - "source": "csv:pattern_replacement_3.csv" - } - ], - "structures": [ - { - "name": "pattern_replacement_3_str", - "components": [ - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "substring_test_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "num_1", - "domain": "number" - }, - { - "name": "text_2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_3/pattern_replacement_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_3/pattern_replacement_3.vtl deleted file mode 100644 index 2e859077f..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pattern_replacement_3/pattern_replacement_3.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= substring_test[ calc Text_2:= replace(Text_1,"[aeiou]")]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/plus/plus-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/plus/plus-spark.json deleted file mode 100644 index 3caee9e67..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/plus/plus-spark.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "spark:csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "plus_str", - "source": "spark:csv:plus.csv" - } - ], - "structures": [ - { - "name": "plus_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/plus/plus.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/plus/plus.json deleted file mode 100644 index e85826a19..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/plus/plus.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "plus_str", - "source": "csv:plus.csv" - } - ], - "structures": [ - { - "name": "plus_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/plus/plus.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/plus/plus.vtl deleted file mode 100644 index 69df831d8..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/plus/plus.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := number_test1 + number_test1; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pow/pow-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pow/pow-spark.json deleted file mode 100644 index 9719b2f1b..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pow/pow-spark.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "spark:csv:number_test1.csv", - "structure": "pow_str" - }, - { - "name": "expected", - "structure": "pow_str", - "source": "spark:csv:pow.csv" - } - ], - "structures": [ - { - "name": "pow_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pow/pow.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pow/pow.json deleted file mode 100644 index 18c382e5f..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pow/pow.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "csv:number_test1.csv", - "structure": "pow_str" - }, - { - "name": "expected", - "structure": "pow_str", - "source": "csv:pow.csv" - } - ], - "structures": [ - { - "name": "pow_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pow/pow.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pow/pow.vtl deleted file mode 100644 index 7ee40617d..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/pow/pow.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := round(power(number_test1, 3),2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_1/power_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_1/power_1-spark.json deleted file mode 100644 index 57a33b790..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_1/power_1-spark.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "spark:csv:power_1_in.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "power_1_str", - "source": "spark:csv:power_1.csv" - } - ], - "structures": [ - { - "name": "power_1_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "integer" - }, - { - "name": "num_1", - "domain": "integer" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_1/power_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_1/power_1.json deleted file mode 100644 index 237195f66..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_1/power_1.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "csv:power_1_in.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "power_1_str", - "source": "csv:power_1.csv" - } - ], - "structures": [ - { - "name": "power_1_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "integer" - }, - { - "name": "num_1", - "domain": "integer" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_1/power_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_1/power_1.vtl deleted file mode 100644 index 6e8fb9ff7..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_1/power_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= round(power(number_test7, number_test7), 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_2/power_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_2/power_2-spark.json deleted file mode 100644 index bc4addb05..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_2/power_2-spark.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "spark:csv:power_2_in.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "power_2_str", - "source": "spark:csv:power_2.csv" - } - ], - "structures": [ - { - "name": "power_2_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "pow_1", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - }, - { - "name": "pow_2", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "integer" - }, - { - "name": "pow_1", - "domain": "integer" - }, - { - "name": "pow_2", - "domain": "number" - }, - { - "name": "num_1", - "domain": "integer" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_2/power_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_2/power_2.json deleted file mode 100644 index 53db93b08..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_2/power_2.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "csv:power_2_in.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "power_2_str", - "source": "csv:power_2.csv" - } - ], - "structures": [ - { - "name": "power_2_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "pow_1", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - }, - { - "name": "pow_2", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "integer" - }, - { - "name": "pow_1", - "domain": "integer" - }, - { - "name": "pow_2", - "domain": "number" - }, - { - "name": "num_1", - "domain": "integer" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_2/power_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_2/power_2.vtl deleted file mode 100644 index 433772f3c..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/power_2/power_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= number_test7[calc Pow_1:= round(power(Num_1, 2), 7), Pow_2:= round(power(Num_2, Num_1), 7)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rank_1/rank_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rank_1/rank_1-spark.json deleted file mode 100644 index 9f5517c44..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rank_1/rank_1-spark.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "datasets": [ - { - "name": "rank_data", - "source": "spark:csv:rank.csv", - "structure": "rank_str" - }, - { - "name": "expected", - "structure": "rank_1_str", - "source": "spark:csv:rank_1.csv" - } - ], - "structures": [ - { - "name": "rank_1_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "me_3", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "rank_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "me_3", - "domain": "integer" - }, - { - "name": "me_2", - "domain": "integer" - }, - { - "name": "me_1", - "domain": "integer" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rank_1/rank_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rank_1/rank_1.json deleted file mode 100644 index da2630d39..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rank_1/rank_1.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "datasets": [ - { - "name": "rank_data", - "source": "csv:rank.csv", - "structure": "rank_str" - }, - { - "name": "expected", - "structure": "rank_1_str", - "source": "csv:rank_1.csv" - } - ], - "structures": [ - { - "name": "rank_1_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "me_3", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "rank_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_3", - "domain": "integer" - }, - { - "name": "me_2", - "domain": "integer" - }, - { - "name": "me_1", - "domain": "integer" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rank_1/rank_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rank_1/rank_1.vtl deleted file mode 100644 index a73a5c193..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rank_1/rank_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= rank_data[calc Me_3 := rank( over (partition by Id_1 , Id_2 order by Me_1))]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_1/ratio_to_report_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_1/ratio_to_report_1-spark.json deleted file mode 100644 index 57c1796ed..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_1/ratio_to_report_1-spark.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "datasets": [ - { - "name": "ratiotoreport", - "source": "spark:csv:ratiotoreport.csv", - "structure": "ratiotoreport_str" - }, - { - "name": "expected", - "structure": "ratio_to_report_1_str", - "source": "spark:csv:ratio_to_report_1.csv" - } - ], - "structures": [ - { - "name": "ratiotoreport_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "ratio_to_report_1_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_1/ratio_to_report_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_1/ratio_to_report_1.json deleted file mode 100644 index b4b37ba49..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_1/ratio_to_report_1.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "datasets": [ - { - "name": "ratiotoreport", - "source": "csv:ratiotoreport.csv", - "structure": "ratiotoreport_str" - }, - { - "name": "expected", - "structure": "ratio_to_report_1_str", - "source": "csv:ratio_to_report_1.csv" - } - ], - "structures": [ - { - "name": "ratiotoreport_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "ratio_to_report_1_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_1/ratio_to_report_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_1/ratio_to_report_1.vtl deleted file mode 100644 index eacb295f5..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_1/ratio_to_report_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= round(ratio_to_report(ratiotoreport over (partition by Id_1, Id_2)), 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_2/ratio_to_report_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_2/ratio_to_report_2-spark.json deleted file mode 100644 index 4a273a962..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_2/ratio_to_report_2-spark.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "datasets": [ - { - "name": "ratiotoreport", - "source": "spark:csv:ratiotoreport.csv", - "structure": "ratiotoreport_str" - }, - { - "name": "expected", - "structure": "ratio_to_report_2_str", - "source": "spark:csv:ratio_to_report_2.csv" - } - ], - "structures": [ - { - "name": "ratiotoreport_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "ratio_to_report_2_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "me_3", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_3", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_2/ratio_to_report_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_2/ratio_to_report_2.json deleted file mode 100644 index 072107625..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_2/ratio_to_report_2.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "datasets": [ - { - "name": "ratiotoreport", - "source": "csv:ratiotoreport.csv", - "structure": "ratiotoreport_str" - }, - { - "name": "expected", - "structure": "ratio_to_report_2_str", - "source": "csv:ratio_to_report_2.csv" - } - ], - "structures": [ - { - "name": "ratiotoreport_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "ratio_to_report_2_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "me_3", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_3", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_2/ratio_to_report_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_2/ratio_to_report_2.vtl deleted file mode 100644 index fbc948be7..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/ratio_to_report_2/ratio_to_report_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= round(ratiotoreport[calc Me_3 := ratio_to_report(Me_1 over (partition by Id_1, Id_2))], 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename/rename-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename/rename-spark.json deleted file mode 100644 index 9f30c3a85..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename/rename-spark.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "spark:csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "rename_str", - "source": "spark:csv:rename.csv" - } - ], - "structures": [ - { - "name": "rename_str", - "components": [ - { - "name": "id2", - "role": "Identifier" - }, - { - "name": "m2", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "m2", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "id2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename/rename.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename/rename.json deleted file mode 100644 index d1e03c640..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename/rename.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "rename_str", - "source": "csv:rename.csv" - } - ], - "structures": [ - { - "name": "rename_str", - "components": [ - { - "name": "id2", - "role": "Identifier" - }, - { - "name": "m2", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "m2", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "id2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename/rename.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename/rename.vtl deleted file mode 100644 index 0d600dd70..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename/rename.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := number_test1[rename id1 to id2, m1 to m2]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename_1/rename_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename_1/rename_1-spark.json deleted file mode 100644 index 789468905..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename_1/rename_1-spark.json +++ /dev/null @@ -1,284 +0,0 @@ -{ - "datasets": [ - { - "name": "ecbexrusd_vtl", - "source": "spark:csv:ecbexrusd_vtl.csv", - "structure": "ecbexrusd_vtl_str" - }, - { - "name": "expected", - "structure": "rename_str", - "source": "spark:csv:rename_1.csv" - } - ], - "structures": [ - { - "name": "rename_str", - "components": [ - { - "name": "me_4", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "me_3", - "role": "Measure" - }, - { - "name": "me_6", - "role": "Measure" - }, - { - "name": "me_5", - "role": "Measure" - }, - { - "name": "me_7", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - }, - { - "name": "ecbexrusd_vtl_str", - "components": [ - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "source_agency", - "domain": "string" - }, - { - "name": "collection", - "domain": "string" - }, - { - "name": "id_1", - "domain": "string" - }, - { - "name": "res5", - "domain": "boolean" - }, - { - "name": "me_6", - "domain": "string" - }, - { - "name": "res4", - "domain": "boolean" - }, - { - "name": "me_7", - "domain": "string" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "time_format", - "domain": "string" - }, - { - "name": "me_3", - "domain": "string" - }, - { - "name": "obs_status", - "domain": "string" - }, - { - "name": "me_4", - "domain": "string" - }, - { - "name": "year", - "domain": "number" - }, - { - "name": "me_5", - "domain": "string" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - }, - { - "name": "unit", - "domain": "string" - }, - { - "name": "decimals", - "domain": "string" - }, - { - "name": "currency_denom", - "domain": "string" - }, - { - "name": "exr_suffix", - "domain": "string" - }, - { - "name": "title", - "domain": "string" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "freq", - "domain": "string" - }, - { - "name": "id", - "domain": "string" - }, - { - "name": "exr_type", - "domain": "string" - }, - { - "name": "unit_mult", - "domain": "string" - }, - { - "name": "currency", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename_1/rename_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename_1/rename_1.json deleted file mode 100644 index d1802bbda..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename_1/rename_1.json +++ /dev/null @@ -1,284 +0,0 @@ -{ - "datasets": [ - { - "name": "ecbexrusd_vtl", - "source": "csv:ecbexrusd_vtl.csv", - "structure": "ecbexrusd_vtl_str" - }, - { - "name": "expected", - "structure": "rename_str", - "source": "csv:rename_1.csv" - } - ], - "structures": [ - { - "name": "rename_str", - "components": [ - { - "name": "me_4", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "me_3", - "role": "Measure" - }, - { - "name": "me_6", - "role": "Measure" - }, - { - "name": "me_5", - "role": "Measure" - }, - { - "name": "me_7", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - }, - { - "name": "ecbexrusd_vtl_str", - "components": [ - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "source_agency", - "domain": "string" - }, - { - "name": "collection", - "domain": "string" - }, - { - "name": "id_1", - "domain": "string" - }, - { - "name": "res5", - "domain": "boolean" - }, - { - "name": "me_6", - "domain": "string" - }, - { - "name": "res4", - "domain": "boolean" - }, - { - "name": "me_7", - "domain": "string" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "time_format", - "domain": "string" - }, - { - "name": "me_3", - "domain": "string" - }, - { - "name": "obs_status", - "domain": "string" - }, - { - "name": "me_4", - "domain": "string" - }, - { - "name": "year", - "domain": "number" - }, - { - "name": "me_5", - "domain": "string" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - }, - { - "name": "unit", - "domain": "string" - }, - { - "name": "decimals", - "domain": "string" - }, - { - "name": "currency_denom", - "domain": "string" - }, - { - "name": "exr_suffix", - "domain": "string" - }, - { - "name": "title", - "domain": "string" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "freq", - "domain": "string" - }, - { - "name": "id", - "domain": "string" - }, - { - "name": "exr_type", - "domain": "string" - }, - { - "name": "unit_mult", - "domain": "string" - }, - { - "name": "currency", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename_1/rename_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename_1/rename_1.vtl deleted file mode 100644 index 0da64c936..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/rename_1/rename_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= ecbexrusd_vtl[rename CURRENCY to Me_3, EXR_SUFFIX to Me_4, CURRENCY_DENOM to Me_5, FREQ to Me_6, EXR_TYPE to Me_7]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round/round-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round/round-spark.json deleted file mode 100644 index 223ca07e4..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round/round-spark.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test3", - "source": "spark:csv:number_test3.csv", - "structure": "round_str" - }, - { - "name": "expected", - "structure": "round_str", - "source": "spark:csv:round.csv" - } - ], - "structures": [ - { - "name": "round_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round/round.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round/round.json deleted file mode 100644 index 7568d4666..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round/round.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test3", - "source": "csv:number_test3.csv", - "structure": "round_str" - }, - { - "name": "expected", - "structure": "round_str", - "source": "csv:round.csv" - } - ], - "structures": [ - { - "name": "round_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round/round.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round/round.vtl deleted file mode 100644 index af6309c72..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round/round.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := round(number_test3, 2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_1/round_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_1/round_1-spark.json deleted file mode 100644 index c3b66b7a1..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_1/round_1-spark.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "spark:csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "round_1_str", - "source": "spark:csv:round_1.csv" - } - ], - "structures": [ - { - "name": "round_1_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_1/round_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_1/round_1.json deleted file mode 100644 index 5dd9d6565..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_1/round_1.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "round_1_str", - "source": "csv:round_1.csv" - } - ], - "structures": [ - { - "name": "round_1_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_1/round_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_1/round_1.vtl deleted file mode 100644 index e3940f36f..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_1/round_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= round(number_test7, 2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_2/round_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_2/round_2-spark.json deleted file mode 100644 index 56acee562..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_2/round_2-spark.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "spark:csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "round_2_str", - "source": "spark:csv:round_2.csv" - } - ], - "structures": [ - { - "name": "round_2_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "round_1", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "round_1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_2/round_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_2/round_2.json deleted file mode 100644 index e1497ec96..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_2/round_2.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "round_2_str", - "source": "csv:round_2.csv" - } - ], - "structures": [ - { - "name": "round_2_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "round_1", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "round_1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_2/round_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_2/round_2.vtl deleted file mode 100644 index 8e5f4f500..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/round_2/round_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= number_test7[calc round_1:= round(Num_2, 2)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator1/self_defined_operator1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator1/self_defined_operator1-spark.json deleted file mode 100644 index 3e9e2f341..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator1/self_defined_operator1-spark.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "spark:csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "self_defined_operator1_str", - "source": "spark:csv:self_defined_operator1.csv" - } - ], - "structures": [ - { - "name": "self_defined_operator1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator1/self_defined_operator1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator1/self_defined_operator1.json deleted file mode 100644 index 5f8bb5df1..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator1/self_defined_operator1.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "csv:number_test1.csv", - "structure": "number_test1_str" - }, - { - "name": "expected", - "structure": "self_defined_operator1_str", - "source": "csv:self_defined_operator1.csv" - } - ], - "structures": [ - { - "name": "self_defined_operator1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - }, - { - "name": "number_test1_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator1/self_defined_operator1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator1/self_defined_operator1.vtl deleted file mode 100644 index b12f28d6e..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator1/self_defined_operator1.vtl +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ - define operator add (x dataset { component _ * }, y dataset { component _ * } ) -returns dataset { component _ * } -is - x+y -end operator; - -test_result := add(number_test1, number_test1); \ No newline at end of file diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator2/self_defined_operator2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator2/self_defined_operator2-spark.json deleted file mode 100644 index 2fb0ceadd..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator2/self_defined_operator2-spark.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "datasets": [ - { - "name": "concat_test2", - "source": "spark:csv:concat_test2.csv", - "structure": "concat_test2_str" - }, - { - "name": "concat_test1", - "source": "spark:csv:concat_test1.csv", - "structure": "concat_test1_str" - }, - { - "name": "expected", - "structure": "self_defined_operator2_str", - "source": "spark:csv:self_defined_operator2.csv" - } - ], - "structures": [ - { - "name": "self_defined_operator2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "concat_test2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "concat_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "text_1", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator2/self_defined_operator2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator2/self_defined_operator2.json deleted file mode 100644 index 4ba27f809..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator2/self_defined_operator2.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "datasets": [ - { - "name": "concat_test2", - "source": "csv:concat_test2.csv", - "structure": "concat_test2_str" - }, - { - "name": "concat_test1", - "source": "csv:concat_test1.csv", - "structure": "concat_test1_str" - }, - { - "name": "expected", - "structure": "self_defined_operator2_str", - "source": "csv:self_defined_operator2.csv" - } - ], - "structures": [ - { - "name": "self_defined_operator2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "concat_test2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "concat_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "text_1", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator2/self_defined_operator2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator2/self_defined_operator2.vtl deleted file mode 100644 index efcb650c9..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/self_defined_operator2/self_defined_operator2.vtl +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ - define operator concat (x dataset { component _ * }, y dataset { component _ * } ) -returns dataset { component _ * } -is - x ||" - " || y -end operator; - -test_result:= concat(concat_test1, concat_test2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/set_difference_1/set_difference_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/set_difference_1/set_difference_1-spark.json deleted file mode 100644 index 20db7c34f..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/set_difference_1/set_difference_1-spark.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "datasets": [ - { - "name": "intersection_test1", - "source": "spark:csv:intersection_test1.csv", - "structure": "intersection_test1_str" - }, - { - "name": "intersection_test2", - "source": "spark:csv:intersection_test2.csv", - "structure": "intersection_test2_str" - }, - { - "name": "expected", - "structure": "set_difference_1_str", - "source": "spark:csv:set_difference_1.csv" - } - ], - "structures": [ - { - "name": "set_difference_1_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "edf2", - "role": "Measure" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - }, - { - "name": "edf3", - "role": "Measure" - }, - { - "name": "quality_status", - "role": "Attribute" - } - ] - }, - { - "name": "intersection_test1_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "edf2", - "role": "Measure" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - }, - { - "name": "edf3", - "role": "Measure" - }, - { - "name": "quality_status", - "role": "Attribute" - } - ] - }, - { - "name": "intersection_test2_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "edf2", - "role": "Measure" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - }, - { - "name": "edf3", - "role": "Measure" - }, - { - "name": "quality_status", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "quality_status", - "domain": "string" - }, - { - "name": "edfdate", - "domain": "date" - }, - { - "name": "edf2", - "domain": "number" - }, - { - "name": "edf3", - "domain": "number" - }, - { - "name": "edf1", - "domain": "number" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "mkmvid", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/set_difference_1/set_difference_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/set_difference_1/set_difference_1.json deleted file mode 100644 index a06d8cb22..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/set_difference_1/set_difference_1.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "datasets": [ - { - "name": "intersection_test1", - "source": "csv:intersection_test1.csv", - "structure": "intersection_test1_str" - }, - { - "name": "intersection_test2", - "source": "csv:intersection_test2.csv", - "structure": "intersection_test2_str" - }, - { - "name": "expected", - "structure": "set_difference_1_str", - "source": "csv:set_difference_1.csv" - } - ], - "structures": [ - { - "name": "set_difference_1_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "edf2", - "role": "Measure" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - }, - { - "name": "edf3", - "role": "Measure" - }, - { - "name": "quality_status", - "role": "Attribute" - } - ] - }, - { - "name": "intersection_test1_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "edf2", - "role": "Measure" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - }, - { - "name": "edf3", - "role": "Measure" - }, - { - "name": "quality_status", - "role": "Attribute" - } - ] - }, - { - "name": "intersection_test2_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "edf2", - "role": "Measure" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - }, - { - "name": "edf3", - "role": "Measure" - }, - { - "name": "quality_status", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "quality_status", - "domain": "string" - }, - { - "name": "edfdate", - "domain": "date" - }, - { - "name": "edf2", - "domain": "number" - }, - { - "name": "edf3", - "domain": "number" - }, - { - "name": "edf1", - "domain": "number" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "mkmvid", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/set_difference_1/set_difference_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/set_difference_1/set_difference_1.vtl deleted file mode 100644 index 45b7ed750..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/set_difference_1/set_difference_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= setdiff(intersection_test1,intersection_test2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt/sqrt-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt/sqrt-spark.json deleted file mode 100644 index d9d03b88d..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt/sqrt-spark.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "spark:csv:number_test1.csv", - "structure": "sqrt_str" - }, - { - "name": "expected", - "structure": "sqrt_str", - "source": "spark:csv:sqrt.csv" - } - ], - "structures": [ - { - "name": "sqrt_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt/sqrt.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt/sqrt.json deleted file mode 100644 index c660461ec..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt/sqrt.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "csv:number_test1.csv", - "structure": "sqrt_str" - }, - { - "name": "expected", - "structure": "sqrt_str", - "source": "csv:sqrt.csv" - } - ], - "structures": [ - { - "name": "sqrt_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt/sqrt.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt/sqrt.vtl deleted file mode 100644 index 4ec6eb8aa..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt/sqrt.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := round(sqrt(number_test1),2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_1/sqrt_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_1/sqrt_1-spark.json deleted file mode 100644 index 1ff29501d..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_1/sqrt_1-spark.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "spark:csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "sqrt_1_str", - "source": "spark:csv:sqrt_1.csv" - } - ], - "structures": [ - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "sqrt_1_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "integer" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_1/sqrt_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_1/sqrt_1.json deleted file mode 100644 index 0750e872e..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_1/sqrt_1.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "sqrt_1_str", - "source": "csv:sqrt_1.csv" - } - ], - "structures": [ - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "sqrt_1_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "integer" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_1/sqrt_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_1/sqrt_1.vtl deleted file mode 100644 index fd8c1f8cd..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_1/sqrt_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= round(sqrt(number_test7), 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_2/number_test7.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_2/number_test7.csv deleted file mode 100644 index dc643e48d..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_2/number_test7.csv +++ /dev/null @@ -1,7 +0,0 @@ -time_period,num_1,num_2 -1999,12,0.001 -2000,3,0.9999 -2001,-9,10.03 -2002,,99 -2003,6, -2004,7,-4 diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_2/sqrt_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_2/sqrt_2-spark.json deleted file mode 100644 index ee9329395..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_2/sqrt_2-spark.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "spark:csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "sqrt_2_str", - "source": "spark:csv:sqrt_2.csv" - } - ], - "structures": [ - { - "name": "sqrt_2_str", - "components": [ - { - "name": "sqrt_3", - "role": "Measure" - }, - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "integer" - }, - { - "name": "sqrt_3", - "domain": "number" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_2/sqrt_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_2/sqrt_2.json deleted file mode 100644 index 88709de26..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_2/sqrt_2.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "sqrt_2_str", - "source": "csv:sqrt_2.csv" - } - ], - "structures": [ - { - "name": "sqrt_2_str", - "components": [ - { - "name": "sqrt_3", - "role": "Measure" - }, - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "integer" - }, - { - "name": "sqrt_3", - "domain": "number" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_2/sqrt_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_2/sqrt_2.vtl deleted file mode 100644 index f7680e758..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sqrt_2/sqrt_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= round(number_test7[calc Sqrt_3:= sqrt(Num_1)], 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_pop/standard_deviation_pop-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_pop/standard_deviation_pop-spark.json deleted file mode 100644 index fd66aaafe..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_pop/standard_deviation_pop-spark.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "median_data", - "source": "spark:csv:median_variance.csv", - "structure": "median_str" - }, - { - "name": "expected", - "structure": "standard_deviation_pop_str", - "source": "spark:csv:standard_deviation_pop.csv" - } - ], - "structures": [ - { - "name": "median_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "standard_deviation_pop_str", - "components": [ - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_pop/standard_deviation_pop.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_pop/standard_deviation_pop.json deleted file mode 100644 index e777ae971..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_pop/standard_deviation_pop.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "median_data", - "source": "csv:median_variance.csv", - "structure": "median_str" - }, - { - "name": "expected", - "structure": "standard_deviation_pop_str", - "source": "csv:standard_deviation_pop.csv" - } - ], - "structures": [ - { - "name": "median_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "standard_deviation_pop_str", - "components": [ - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_samp/standard_deviation_samp-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_samp/standard_deviation_samp-spark.json deleted file mode 100644 index 512645d89..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_samp/standard_deviation_samp-spark.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "stdev", - "source": "spark:csv:stdev.csv", - "structure": "stdev_str" - }, - { - "name": "expected", - "structure": "standard_deviation_samp_str", - "source": "spark:csv:standard_deviation_samp.csv" - } - ], - "structures": [ - { - "name": "standard_deviation_samp_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "stdev_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_samp/standard_deviation_samp.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_samp/standard_deviation_samp.json deleted file mode 100644 index 3a52b372a..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_samp/standard_deviation_samp.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "stdev", - "source": "csv:stdev.csv", - "structure": "stdev_str" - }, - { - "name": "expected", - "structure": "standard_deviation_samp_str", - "source": "csv:standard_deviation_samp.csv" - } - ], - "structures": [ - { - "name": "standard_deviation_samp_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "stdev_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_samp/standard_deviation_samp.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_samp/standard_deviation_samp.vtl deleted file mode 100644 index 12bbc7daf..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/standard_deviation_samp/standard_deviation_samp.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= round(stddev_samp(stdev group by Id_2), 7); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_1/stock_to_flow_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_1/stock_to_flow_1-spark.json deleted file mode 100644 index d966d52dc..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_1/stock_to_flow_1-spark.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "stock_daily_test", - "source": "spark:csv:stock_daily_test.csv", - "structure": "stock_daily_test_str" - }, - { - "name": "expected", - "structure": "stock_to_flow_1_str", - "source": "spark:csv:stock_to_flow_1.csv" - } - ], - "structures": [ - { - "name": "stock_daily_test_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_daily", - "role": "Identifier" - } - ] - }, - { - "name": "stock_to_flow_1_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_daily", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "res4", - "domain": "boolean" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_daily", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_1/stock_to_flow_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_1/stock_to_flow_1.json deleted file mode 100644 index 1dc3a7d3d..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_1/stock_to_flow_1.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "stock_daily_test", - "source": "csv:stock_daily_test.csv", - "structure": "stock_daily_test_str" - }, - { - "name": "expected", - "structure": "stock_to_flow_1_str", - "source": "csv:stock_to_flow_1.csv" - } - ], - "structures": [ - { - "name": "stock_daily_test_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_daily", - "role": "Identifier" - } - ] - }, - { - "name": "stock_to_flow_1_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_daily", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "res4", - "domain": "boolean" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_daily", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_1/stock_to_flow_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_1/stock_to_flow_1.vtl deleted file mode 100644 index e54ba5d48..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_1/stock_to_flow_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= stock_to_flow(stock_daily_test); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_2/stock_to_flow_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_2/stock_to_flow_2-spark.json deleted file mode 100644 index 48b756884..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_2/stock_to_flow_2-spark.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "stock_annual_test", - "source": "spark:csv:stock_annual_test.csv", - "structure": "stock_annual_test_str" - }, - { - "name": "expected", - "structure": "stock_to_flow_2_str", - "source": "spark:csv:stock_to_flow_2.csv" - } - ], - "structures": [ - { - "name": "stock_annual_test_str", - "components": [ - { - "name": "id_annual", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "stock_to_flow_2_str", - "components": [ - { - "name": "id_annual", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_annual", - "domain": "date" - }, - { - "name": "res4", - "domain": "boolean" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_2/stock_to_flow_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_2/stock_to_flow_2.json deleted file mode 100644 index b85c411c0..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_2/stock_to_flow_2.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "stock_annual_test", - "source": "csv:stock_annual_test.csv", - "structure": "stock_annual_test_str" - }, - { - "name": "expected", - "structure": "stock_to_flow_2_str", - "source": "csv:stock_to_flow_2.csv" - } - ], - "structures": [ - { - "name": "stock_annual_test_str", - "components": [ - { - "name": "id_annual", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "stock_to_flow_2_str", - "components": [ - { - "name": "id_annual", - "role": "Identifier" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_annual", - "domain": "date" - }, - { - "name": "res4", - "domain": "boolean" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_2/stock_to_flow_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_2/stock_to_flow_2.vtl deleted file mode 100644 index ecfbf71df..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/stock_to_flow_2/stock_to_flow_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= stock_to_flow(stock_annual_test); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_1/string_concatenation_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_1/string_concatenation_1-spark.json deleted file mode 100644 index 7f276a3e2..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_1/string_concatenation_1-spark.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "datasets": [ - { - "name": "trim_test", - "source": "spark:csv:trim_test.csv", - "structure": "trim_test_str" - }, - { - "name": "expected", - "structure": "string_concatenation_1_str", - "source": "spark:csv:string_concatenation_1.csv" - } - ], - "structures": [ - { - "name": "trim_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "string_concatenation_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_3", - "role": "Measure" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "text_3", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "text_2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_1/string_concatenation_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_1/string_concatenation_1.json deleted file mode 100644 index 4034c4064..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_1/string_concatenation_1.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "datasets": [ - { - "name": "trim_test", - "source": "csv:trim_test.csv", - "structure": "trim_test_str" - }, - { - "name": "expected", - "structure": "string_concatenation_1_str", - "source": "csv:string_concatenation_1.csv" - } - ], - "structures": [ - { - "name": "trim_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "string_concatenation_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_3", - "role": "Measure" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "number" - }, - { - "name": "text_3", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "text_2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_1/string_concatenation_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_1/string_concatenation_1.vtl deleted file mode 100644 index d4a4377ab..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_1/string_concatenation_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= trim_test[ calc Text_3:= Text_1||", world!"]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_2/string_concatenation_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_2/string_concatenation_2-spark.json deleted file mode 100644 index 462594841..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_2/string_concatenation_2-spark.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "datasets": [ - { - "name": "trim_test", - "source": "spark:csv:trim_test.csv", - "structure": "trim_test_str" - }, - { - "name": "expected", - "structure": "string_concatenation_2_str", - "source": "spark:csv:string_concatenation_2.csv" - } - ], - "structures": [ - { - "name": "string_concatenation_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_3", - "role": "Measure" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "trim_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "text_3", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "text_2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_2/string_concatenation_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_2/string_concatenation_2.json deleted file mode 100644 index 61772bb0e..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_2/string_concatenation_2.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "datasets": [ - { - "name": "trim_test", - "source": "csv:trim_test.csv", - "structure": "trim_test_str" - }, - { - "name": "expected", - "structure": "string_concatenation_2_str", - "source": "csv:string_concatenation_2.csv" - } - ], - "structures": [ - { - "name": "string_concatenation_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_3", - "role": "Measure" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "trim_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "text_3", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "text_2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_2/string_concatenation_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_2/string_concatenation_2.vtl deleted file mode 100644 index 365e998f5..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_2/string_concatenation_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= trim_test[calc Text_3 := Text_1 || Text_2]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_3/string_concatenation_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_3/string_concatenation_3-spark.json deleted file mode 100644 index 7e7dca07f..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_3/string_concatenation_3-spark.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "datasets": [ - { - "name": "concat_test2", - "source": "spark:csv:concat_test2.csv", - "structure": "concat_test2_str" - }, - { - "name": "concat_test1", - "source": "spark:csv:concat_test1.csv", - "structure": "concat_test1_str" - }, - { - "name": "expected", - "structure": "string_concatenation_3_str", - "source": "spark:csv:string_concatenation_3.csv" - } - ], - "structures": [ - { - "name": "string_concatenation_3_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "concat_test2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "concat_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "text_1", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_3/string_concatenation_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_3/string_concatenation_3.json deleted file mode 100644 index 19930c682..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_3/string_concatenation_3.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "datasets": [ - { - "name": "concat_test2", - "source": "csv:concat_test2.csv", - "structure": "concat_test2_str" - }, - { - "name": "concat_test1", - "source": "csv:concat_test1.csv", - "structure": "concat_test1_str" - }, - { - "name": "expected", - "structure": "string_concatenation_3_str", - "source": "csv:string_concatenation_3.csv" - } - ], - "structures": [ - { - "name": "string_concatenation_3_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "concat_test2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "concat_test1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "text_1", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_3/string_concatenation_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_3/string_concatenation_3.vtl deleted file mode 100644 index 687020d3c..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_concatenation_3/string_concatenation_3.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= concat_test1||" - " ||concat_test2; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_1/string_trim_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_1/string_trim_1-spark.json deleted file mode 100644 index 6774356a5..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_1/string_trim_1-spark.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "trim_test", - "source": "spark:csv:trim_test.csv", - "structure": "trim_test_str" - }, - { - "name": "expected", - "structure": "string_trim_1_str", - "source": "spark:csv:string_trim_1.csv" - } - ], - "structures": [ - { - "name": "trim_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "string_trim_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "text_2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_1/string_trim_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_1/string_trim_1.json deleted file mode 100644 index 7f4b0ff56..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_1/string_trim_1.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "trim_test", - "source": "csv:trim_test.csv", - "structure": "trim_test_str" - }, - { - "name": "expected", - "structure": "string_trim_1_str", - "source": "csv:string_trim_1.csv" - } - ], - "structures": [ - { - "name": "trim_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "string_trim_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "text_2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_1/string_trim_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_1/string_trim_1.vtl deleted file mode 100644 index 1b2890491..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_1/string_trim_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= trim(trim_test); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_2/string_trim_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_2/string_trim_2-spark.json deleted file mode 100644 index ccb6bc78c..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_2/string_trim_2-spark.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "trim_test", - "source": "spark:csv:trim_test.csv", - "structure": "trim_test_str" - }, - { - "name": "expected", - "structure": "string_trim_2_str", - "source": "spark:csv:string_trim_2.csv" - } - ], - "structures": [ - { - "name": "trim_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "string_trim_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "text_2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_2/string_trim_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_2/string_trim_2.json deleted file mode 100644 index eb8e518e0..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_2/string_trim_2.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "trim_test", - "source": "csv:trim_test.csv", - "structure": "trim_test_str" - }, - { - "name": "expected", - "structure": "string_trim_2_str", - "source": "csv:string_trim_2.csv" - } - ], - "structures": [ - { - "name": "trim_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "string_trim_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "text_2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_2/string_trim_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_2/string_trim_2.vtl deleted file mode 100644 index 2cfe004f2..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_2/string_trim_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= ltrim(trim_test); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_3/string_trim_3-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_3/string_trim_3-spark.json deleted file mode 100644 index 7a9e608b9..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_3/string_trim_3-spark.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "trim_test", - "source": "spark:csv:trim_test.csv", - "structure": "trim_test_str" - }, - { - "name": "expected", - "structure": "string_trim_3_str", - "source": "spark:csv:string_trim_3.csv" - } - ], - "structures": [ - { - "name": "string_trim_3_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "trim_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "text_2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_3/string_trim_3.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_3/string_trim_3.json deleted file mode 100644 index 7b06175a8..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_3/string_trim_3.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "trim_test", - "source": "csv:trim_test.csv", - "structure": "trim_test_str" - }, - { - "name": "expected", - "structure": "string_trim_3_str", - "source": "csv:string_trim_3.csv" - } - ], - "structures": [ - { - "name": "string_trim_3_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "trim_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "text_2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_3/string_trim_3.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_3/string_trim_3.vtl deleted file mode 100644 index 32065acfd..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_3/string_trim_3.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= rtrim(trim_test); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_4/string_trim_4-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_4/string_trim_4-spark.json deleted file mode 100644 index 99d8c45db..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_4/string_trim_4-spark.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "datasets": [ - { - "name": "trim_test", - "source": "spark:csv:trim_test.csv", - "structure": "trim_test_str" - }, - { - "name": "expected", - "structure": "string_trim_4_str", - "source": "spark:csv:string_trim_4.csv" - } - ], - "structures": [ - { - "name": "trim_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "string_trim_4_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_3", - "role": "Measure" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "text_4", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "text_3", - "domain": "string" - }, - { - "name": "text_4", - "domain": "string" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "text_2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_4/string_trim_4.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_4/string_trim_4.json deleted file mode 100644 index b48cb3c20..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_4/string_trim_4.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "datasets": [ - { - "name": "trim_test", - "source": "csv:trim_test.csv", - "structure": "trim_test_str" - }, - { - "name": "expected", - "structure": "string_trim_4_str", - "source": "csv:string_trim_4.csv" - } - ], - "structures": [ - { - "name": "trim_test_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "string_trim_4_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "text_3", - "role": "Measure" - }, - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "text_4", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_2", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_1", - "domain": "integer" - }, - { - "name": "text_3", - "domain": "string" - }, - { - "name": "text_4", - "domain": "string" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "text_2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_4/string_trim_4.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_4/string_trim_4.vtl deleted file mode 100644 index 70776dd18..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/string_trim_4/string_trim_4.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= trim_test[ calc Text_3:= ltrim(Text_1), Text_4:= rtrim(Text_2)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub/sub-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub/sub-spark.json deleted file mode 100644 index 99653d658..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub/sub-spark.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test5", - "source": "spark:csv:number_test5.csv", - "structure": "number_test5_str" - }, - { - "name": "expected", - "structure": "sub_str", - "source": "spark:csv:sub.csv" - } - ], - "structures": [ - { - "name": "number_test5_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "id2", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - }, - { - "name": "sub_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "id2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub/sub.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub/sub.json deleted file mode 100644 index 537d345d4..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub/sub.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test5", - "source": "csv:number_test5.csv", - "structure": "number_test5_str" - }, - { - "name": "expected", - "structure": "sub_str", - "source": "csv:sub.csv" - } - ], - "structures": [ - { - "name": "number_test5_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "id2", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - }, - { - "name": "sub_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "id2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub/sub.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub/sub.vtl deleted file mode 100644 index f1b570357..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub/sub.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := number_test5[sub id2 = "c"]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub_1/sub_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub_1/sub_1-spark.json deleted file mode 100644 index 167ed2842..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub_1/sub_1-spark.json +++ /dev/null @@ -1,248 +0,0 @@ -{ - "datasets": [ - { - "name": "ecbexrusd_vtl", - "source": "spark:csv:ecbexrusd_vtl.csv", - "structure": "ecbexrusd_vtl_str" - }, - { - "name": "expected", - "structure": "sub_str", - "source": "spark:csv:sub_1.csv" - } - ], - "structures": [ - { - "name": "sub_str", - "components": [ - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - }, - { - "name": "ecbexrusd_vtl_str", - "components": [ - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "unit", - "domain": "string" - }, - { - "name": "decimals", - "domain": "string" - }, - { - "name": "currency_denom", - "domain": "string" - }, - { - "name": "source_agency", - "domain": "string" - }, - { - "name": "exr_suffix", - "domain": "string" - }, - { - "name": "collection", - "domain": "string" - }, - { - "name": "title", - "domain": "string" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "freq", - "domain": "string" - }, - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id", - "domain": "string" - }, - { - "name": "exr_type", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "time_format", - "domain": "string" - }, - { - "name": "obs_status", - "domain": "string" - }, - { - "name": "year", - "domain": "number" - }, - { - "name": "unit_mult", - "domain": "string" - }, - { - "name": "currency", - "domain": "string" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub_1/sub_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub_1/sub_1.json deleted file mode 100644 index 50a9faf09..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub_1/sub_1.json +++ /dev/null @@ -1,248 +0,0 @@ -{ - "datasets": [ - { - "name": "ecbexrusd_vtl", - "source": "csv:ecbexrusd_vtl.csv", - "structure": "ecbexrusd_vtl_str" - }, - { - "name": "expected", - "structure": "sub_str", - "source": "csv:sub_1.csv" - } - ], - "structures": [ - { - "name": "sub_str", - "components": [ - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - }, - { - "name": "ecbexrusd_vtl_str", - "components": [ - { - "name": "exr_suffix", - "role": "Measure" - }, - { - "name": "time_format", - "role": "Attribute" - }, - { - "name": "freq", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id", - "role": "Attribute" - }, - { - "name": "title", - "role": "Attribute" - }, - { - "name": "unit_mult", - "role": "Attribute" - }, - { - "name": "year", - "role": "Identifier" - }, - { - "name": "unit", - "role": "Attribute" - }, - { - "name": "currency", - "role": "Measure" - }, - { - "name": "currency_denom", - "role": "Measure" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "source_agency", - "role": "Attribute" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "exr_type", - "role": "Measure" - }, - { - "name": "decimals", - "role": "Attribute" - }, - { - "name": "collection", - "role": "Attribute" - }, - { - "name": "obs_status", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "unit", - "domain": "string" - }, - { - "name": "decimals", - "domain": "string" - }, - { - "name": "currency_denom", - "domain": "string" - }, - { - "name": "source_agency", - "domain": "string" - }, - { - "name": "exr_suffix", - "domain": "string" - }, - { - "name": "collection", - "domain": "string" - }, - { - "name": "title", - "domain": "string" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "freq", - "domain": "string" - }, - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id", - "domain": "string" - }, - { - "name": "exr_type", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "time_format", - "domain": "string" - }, - { - "name": "obs_status", - "domain": "string" - }, - { - "name": "year", - "domain": "number" - }, - { - "name": "unit_mult", - "domain": "string" - }, - { - "name": "currency", - "domain": "string" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub_1/sub_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub_1/sub_1.vtl deleted file mode 100644 index cf3514c17..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sub_1/sub_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= ecbexrusd_vtl[sub Id_1="A"]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_1/substring_extraction_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_1/substring_extraction_1-spark.json deleted file mode 100644 index 606351905..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_1/substring_extraction_1-spark.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "substring_test", - "source": "spark:csv:substring_test.csv", - "structure": "substring_test_str" - }, - { - "name": "expected", - "structure": "substring_extraction_1_str", - "source": "spark:csv:substring_extraction_1.csv" - } - ], - "structures": [ - { - "name": "substring_extraction_1_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "substring_test_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_1/substring_extraction_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_1/substring_extraction_1.json deleted file mode 100644 index c0d335fc2..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_1/substring_extraction_1.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "substring_test", - "source": "csv:substring_test.csv", - "structure": "substring_test_str" - }, - { - "name": "expected", - "structure": "substring_extraction_1_str", - "source": "csv:substring_extraction_1.csv" - } - ], - "structures": [ - { - "name": "substring_extraction_1_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - } - ] - }, - { - "name": "substring_test_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_1/substring_extraction_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_1/substring_extraction_1.vtl deleted file mode 100644 index 2fe2c97ad..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_1/substring_extraction_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= substr(substring_test#Text_1,2,4); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_2/substring_extraction_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_2/substring_extraction_2-spark.json deleted file mode 100644 index 7fb2f216c..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_2/substring_extraction_2-spark.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "substring_test", - "source": "spark:csv:substring_test.csv", - "structure": "substring_test_str" - }, - { - "name": "expected", - "structure": "substring_extraction_2_str", - "source": "spark:csv:substring_extraction_2.csv" - } - ], - "structures": [ - { - "name": "substring_extraction_2_str", - "components": [ - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "substring_test_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "num_1", - "domain": "number" - }, - { - "name": "text_2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_2/substring_extraction_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_2/substring_extraction_2.json deleted file mode 100644 index 541c7827a..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_2/substring_extraction_2.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "substring_test", - "source": "csv:substring_test.csv", - "structure": "substring_test_str" - }, - { - "name": "expected", - "structure": "substring_extraction_2_str", - "source": "csv:substring_extraction_2.csv" - } - ], - "structures": [ - { - "name": "substring_extraction_2_str", - "components": [ - { - "name": "text_2", - "role": "Measure" - }, - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "substring_test_str", - "components": [ - { - "name": "text_1", - "role": "Measure" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "text_1", - "domain": "string" - }, - { - "name": "num_1", - "domain": "number" - }, - { - "name": "text_2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_2/substring_extraction_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_2/substring_extraction_2.vtl deleted file mode 100644 index badd01c34..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/substring_extraction_2/substring_extraction_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= substring_test[ calc Text_2:= substr(Text_1,5,10)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum/sum-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum/sum-spark.json deleted file mode 100644 index ccf761505..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum/sum-spark.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test5", - "source": "spark:csv:number_test5.csv", - "structure": "number_test5_str" - }, - { - "name": "expected", - "structure": "sum_str", - "source": "spark:csv:sum.csv" - } - ], - "structures": [ - { - "name": "number_test5_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "id2", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - }, - { - "name": "sum_str", - "components": [ - { - "name": "id2", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "m2", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "id2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum/sum.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum/sum.json deleted file mode 100644 index 6409eabd2..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum/sum.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test5", - "source": "csv:number_test5.csv", - "structure": "number_test5_str" - }, - { - "name": "expected", - "structure": "sum_str", - "source": "csv:sum.csv" - } - ], - "structures": [ - { - "name": "number_test5_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "id2", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - }, - { - "name": "sum_str", - "components": [ - { - "name": "id2", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "m2", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - }, - { - "name": "id2", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum/sum.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum/sum.vtl deleted file mode 100644 index 0b8b51bc0..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum/sum.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := sum(number_test5 group by id2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum_1/sum_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum_1/sum_1-spark.json deleted file mode 100644 index 7f756ea70..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum_1/sum_1-spark.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "median_data", - "source": "spark:csv:median_variance.csv", - "structure": "median_str" - }, - { - "name": "expected", - "structure": "sum_str", - "source": "spark:csv:sum_1.csv" - } - ], - "structures": [ - { - "name": "median_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "sum_str", - "components": [ - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum_1/sum_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum_1/sum_1.json deleted file mode 100644 index c4661a35a..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/sum_1/sum_1.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "median_data", - "source": "csv:median_variance.csv", - "structure": "median_str" - }, - { - "name": "expected", - "structure": "sum_str", - "source": "csv:sum_1.csv" - } - ], - "structures": [ - { - "name": "median_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "sum_str", - "components": [ - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/symmetric_difference_1/symmetric_difference_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/symmetric_difference_1/symmetric_difference_1-spark.json deleted file mode 100644 index 0f5b8b458..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/symmetric_difference_1/symmetric_difference_1-spark.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "intersection_test1", - "source": "spark:csv:intersection_test1.csv", - "structure": "symmetric_difference_1_str" - }, - { - "name": "intersection_test2", - "source": "spark:csv:intersection_test2.csv", - "structure": "symmetric_difference_1_str" - }, - { - "name": "expected", - "structure": "symmetric_difference_1_str", - "source": "spark:csv:symmetric_difference_1.csv" - } - ], - "structures": [ - { - "name": "symmetric_difference_1_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "edf2", - "role": "Measure" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - }, - { - "name": "edf3", - "role": "Measure" - }, - { - "name": "quality_status", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "quality_status", - "domain": "string" - }, - { - "name": "edfdate", - "domain": "date" - }, - { - "name": "edf2", - "domain": "number" - }, - { - "name": "edf3", - "domain": "number" - }, - { - "name": "edf1", - "domain": "number" - }, - { - "name": "mkmvid", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/symmetric_difference_1/symmetric_difference_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/symmetric_difference_1/symmetric_difference_1.json deleted file mode 100644 index a75baf2e4..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/symmetric_difference_1/symmetric_difference_1.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "intersection_test1", - "source": "csv:intersection_test1.csv", - "structure": "symmetric_difference_1_str" - }, - { - "name": "intersection_test2", - "source": "csv:intersection_test2.csv", - "structure": "symmetric_difference_1_str" - }, - { - "name": "expected", - "structure": "symmetric_difference_1_str", - "source": "csv:symmetric_difference_1.csv" - } - ], - "structures": [ - { - "name": "symmetric_difference_1_str", - "components": [ - { - "name": "edfdate", - "role": "Identifier" - }, - { - "name": "edf2", - "role": "Measure" - }, - { - "name": "mkmvid", - "role": "Identifier" - }, - { - "name": "edf1", - "role": "Measure" - }, - { - "name": "edf3", - "role": "Measure" - }, - { - "name": "quality_status", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "quality_status", - "domain": "string" - }, - { - "name": "edfdate", - "domain": "date" - }, - { - "name": "edf2", - "domain": "number" - }, - { - "name": "edf3", - "domain": "number" - }, - { - "name": "edf1", - "domain": "number" - }, - { - "name": "mkmvid", - "domain": "string" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/symmetric_difference_1/symmetric_difference_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/symmetric_difference_1/symmetric_difference_1.vtl deleted file mode 100644 index c4425a38d..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/symmetric_difference_1/symmetric_difference_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= symdiff(intersection_test1,intersection_test2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_1/timeshift_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_1/timeshift_1-spark.json deleted file mode 100644 index bac8efb74..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_1/timeshift_1-spark.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "stock_daily_test", - "source": "spark:csv:stock_daily_test.csv", - "structure": "stock_daily_test_str" - }, - { - "name": "expected", - "structure": "timeshift_1_str", - "source": "spark:csv:timeshift_1.csv" - } - ], - "structures": [ - { - "name": "stock_daily_test_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_daily", - "role": "Identifier" - } - ] - }, - { - "name": "timeshift_1_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_daily", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "res4", - "domain": "boolean" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_daily", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "integer" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_1/timeshift_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_1/timeshift_1.json deleted file mode 100644 index 8d265ee0b..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_1/timeshift_1.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "stock_daily_test", - "source": "csv:stock_daily_test.csv", - "structure": "stock_daily_test_str" - }, - { - "name": "expected", - "structure": "timeshift_1_str", - "source": "csv:timeshift_1.csv" - } - ], - "structures": [ - { - "name": "stock_daily_test_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_daily", - "role": "Identifier" - } - ] - }, - { - "name": "timeshift_1_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_daily", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "res4", - "domain": "boolean" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_daily", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "integer" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_1/timeshift_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_1/timeshift_1.vtl deleted file mode 100644 index db14b672d..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_1/timeshift_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= timeshift(stock_daily_test, 3); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_2/timeshift_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_2/timeshift_2-spark.json deleted file mode 100644 index 9992d69e4..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_2/timeshift_2-spark.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "stock_daily_test", - "source": "spark:csv:stock_daily_test.csv", - "structure": "stock_daily_test_str" - }, - { - "name": "expected", - "structure": "timeshift_2_str", - "source": "spark:csv:timeshift_2.csv" - } - ], - "structures": [ - { - "name": "stock_daily_test_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_daily", - "role": "Identifier" - } - ] - }, - { - "name": "timeshift_2_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_daily", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "res4", - "domain": "boolean" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_daily", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_2/timeshift_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_2/timeshift_2.json deleted file mode 100644 index 816316499..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_2/timeshift_2.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "datasets": [ - { - "name": "stock_daily_test", - "source": "csv:stock_daily_test.csv", - "structure": "stock_daily_test_str" - }, - { - "name": "expected", - "structure": "timeshift_2_str", - "source": "csv:timeshift_2.csv" - } - ], - "structures": [ - { - "name": "stock_daily_test_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_daily", - "role": "Identifier" - } - ] - }, - { - "name": "timeshift_2_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_daily", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "res4", - "domain": "boolean" - }, - { - "name": "res3", - "domain": "boolean" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "id_daily", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_2/timeshift_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_2/timeshift_2.vtl deleted file mode 100644 index 23ed317e6..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/timeshift_2/timeshift_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= timeshift(stock_daily_test, -2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_1/number_test7.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_1/number_test7.csv deleted file mode 100644 index dc643e48d..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_1/number_test7.csv +++ /dev/null @@ -1,7 +0,0 @@ -time_period,num_1,num_2 -1999,12,0.001 -2000,3,0.9999 -2001,-9,10.03 -2002,,99 -2003,6, -2004,7,-4 diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_1/trunc_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_1/trunc_1-spark.json deleted file mode 100644 index 6fb15a800..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_1/trunc_1-spark.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "spark:csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "trunc_1_str", - "source": "spark:csv:trunc_1.csv" - } - ], - "structures": [ - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "trunc_1_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_1/trunc_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_1/trunc_1.json deleted file mode 100644 index 5f81338d3..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_1/trunc_1.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "trunc_1_str", - "source": "csv:trunc_1.csv" - } - ], - "structures": [ - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "trunc_1_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_1/trunc_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_1/trunc_1.vtl deleted file mode 100644 index 2621367ab..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_1/trunc_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= trunc(number_test7, 2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_2/number_test7.csv b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_2/number_test7.csv deleted file mode 100644 index dc643e48d..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_2/number_test7.csv +++ /dev/null @@ -1,7 +0,0 @@ -time_period,num_1,num_2 -1999,12,0.001 -2000,3,0.9999 -2001,-9,10.03 -2002,,99 -2003,6, -2004,7,-4 diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_2/trunc_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_2/trunc_2-spark.json deleted file mode 100644 index 6ab889048..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_2/trunc_2-spark.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "spark:csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "trunc_2_str", - "source": "spark:csv:trunc_2.csv" - } - ], - "structures": [ - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "trunc_2_str", - "components": [ - { - "name": "trun", - "role": "Measure" - }, - { - "name": "roun", - "role": "Measure" - }, - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "roun", - "domain": "number" - }, - { - "name": "num_1", - "domain": "number" - }, - { - "name": "trun", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_2/trunc_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_2/trunc_2.json deleted file mode 100644 index e43cce23c..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_2/trunc_2.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test7", - "source": "csv:number_test7.csv", - "structure": "number_test7_str" - }, - { - "name": "expected", - "structure": "trunc_2_str", - "source": "csv:trunc_2.csv" - } - ], - "structures": [ - { - "name": "number_test7_str", - "components": [ - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "trunc_2_str", - "components": [ - { - "name": "trun", - "role": "Measure" - }, - { - "name": "roun", - "role": "Measure" - }, - { - "name": "time_period", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "num_2", - "domain": "number" - }, - { - "name": "time_period", - "domain": "number" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "roun", - "domain": "number" - }, - { - "name": "num_1", - "domain": "number" - }, - { - "name": "trun", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_2/trunc_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_2/trunc_2.vtl deleted file mode 100644 index 55dab054e..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/trunc_2/trunc_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ - /** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= number_test7[calc roun:= round(Num_2, 1), trun:= trunc(Num_2, 1)]; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uminus/uminus-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uminus/uminus-spark.json deleted file mode 100644 index 29f5485fd..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uminus/uminus-spark.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "spark:csv:number_test1.csv", - "structure": "uminus_str" - }, - { - "name": "expected", - "structure": "uminus_str", - "source": "spark:csv:uminus.csv" - } - ], - "structures": [ - { - "name": "uminus_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uminus/uminus.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uminus/uminus.json deleted file mode 100644 index ad539deb5..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uminus/uminus.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "csv:number_test1.csv", - "structure": "uminus_str" - }, - { - "name": "expected", - "structure": "uminus_str", - "source": "csv:uminus.csv" - } - ], - "structures": [ - { - "name": "uminus_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uminus/uminus.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uminus/uminus.vtl deleted file mode 100644 index 2efaf8296..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uminus/uminus.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := -number_test1; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_1/union_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_1/union_1-spark.json deleted file mode 100644 index 73628e5c2..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_1/union_1-spark.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "datasets": [ - { - "name": "union_test_2", - "source": "spark:csv:union_test_2.csv", - "structure": "union_test_2_str" - }, - { - "name": "union_test_1", - "source": "spark:csv:union_test_1.csv", - "structure": "union_test_1_str" - }, - { - "name": "expected", - "structure": "union_1_str", - "source": "spark:csv:union_1.csv" - } - ], - "structures": [ - { - "name": "union_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "union_test_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "union_test_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "num_2", - "domain": "number" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_1/union_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_1/union_1.json deleted file mode 100644 index f187e1a54..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_1/union_1.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "datasets": [ - { - "name": "union_test_2", - "source": "csv:union_test_2.csv", - "structure": "union_test_2_str" - }, - { - "name": "union_test_1", - "source": "csv:union_test_1.csv", - "structure": "union_test_1_str" - }, - { - "name": "expected", - "structure": "union_1_str", - "source": "csv:union_1.csv" - } - ], - "structures": [ - { - "name": "union_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "union_test_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "union_test_1_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "num_2", - "domain": "number" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "num_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_1/union_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_1/union_1.vtl deleted file mode 100644 index 70035b3f5..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_1/union_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= union(union_test_1, union_test_2); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_2/union_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_2/union_2-spark.json deleted file mode 100644 index 649558406..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_2/union_2-spark.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "union_test_2", - "source": "spark:csv:union_test_2.csv", - "structure": "union_test_2_str" - }, - { - "name": "expected", - "structure": "union_2_str", - "source": "spark:csv:union_2.csv" - } - ], - "structures": [ - { - "name": "union_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "union_test_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "date" - }, - { - "name": "num_2", - "domain": "number" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "num_1", - "domain": "integer" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_2/union_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_2/union_2.json deleted file mode 100644 index e72abd0da..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_2/union_2.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "datasets": [ - { - "name": "union_test_2", - "source": "csv:union_test_2.csv", - "structure": "union_test_2_str" - }, - { - "name": "expected", - "structure": "union_2_str", - "source": "csv:union_2.csv" - } - ], - "structures": [ - { - "name": "union_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - }, - { - "name": "union_test_2_str", - "components": [ - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "num_2", - "role": "Measure" - }, - { - "name": "num_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "date" - }, - { - "name": "num_2", - "domain": "number" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "num_1", - "domain": "integer" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_2/union_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_2/union_2.vtl deleted file mode 100644 index e5afff63d..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/union_2/union_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := union(union_test_2[filter num_1<=2][calc num_1 := -999], union_test_2[filter num_1>2]); diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uplus/uplus-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uplus/uplus-spark.json deleted file mode 100644 index 69cf0da57..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uplus/uplus-spark.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "spark:csv:number_test1.csv", - "structure": "uplus_str" - }, - { - "name": "expected", - "structure": "uplus_str", - "source": "spark:csv:uplus.csv" - } - ], - "structures": [ - { - "name": "uplus_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uplus/uplus.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uplus/uplus.json deleted file mode 100644 index ff9e1f12c..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uplus/uplus.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "datasets": [ - { - "name": "number_test1", - "source": "csv:number_test1.csv", - "structure": "uplus_str" - }, - { - "name": "expected", - "structure": "uplus_str", - "source": "csv:uplus.csv" - } - ], - "structures": [ - { - "name": "uplus_str", - "components": [ - { - "name": "id1", - "role": "Identifier" - }, - { - "name": "m1", - "role": "Measure" - }, - { - "name": "att1", - "role": "Attribute" - } - ] - } - ], - "variables": [ - { - "name": "m1", - "domain": "number" - }, - { - "name": "id1", - "domain": "string" - }, - { - "name": "att1", - "domain": "string" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uplus/uplus.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uplus/uplus.vtl deleted file mode 100644 index 29de8c7a7..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/uplus/uplus.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result := +number_test1; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_pop/var_pop-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_pop/var_pop-spark.json deleted file mode 100644 index 8bdfccb55..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_pop/var_pop-spark.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "median_data", - "source": "spark:csv:median_variance.csv", - "structure": "median_str" - }, - { - "name": "expected", - "structure": "var_pop_str", - "source": "spark:csv:var_pop.csv" - } - ], - "structures": [ - { - "name": "median_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "var_pop_str", - "components": [ - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_pop/var_pop.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_pop/var_pop.json deleted file mode 100644 index 3d6d87917..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_pop/var_pop.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "median_data", - "source": "csv:median_variance.csv", - "structure": "median_str" - }, - { - "name": "expected", - "structure": "var_pop_str", - "source": "csv:var_pop.csv" - } - ], - "structures": [ - { - "name": "median_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "var_pop_str", - "components": [ - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_samp/var_samp-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_samp/var_samp-spark.json deleted file mode 100644 index 7dc9bffb6..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_samp/var_samp-spark.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "median_data", - "source": "spark:csv:median_variance.csv", - "structure": "median_str" - }, - { - "name": "expected", - "structure": "var_samp_str", - "source": "spark:csv:var_samp.csv" - } - ], - "structures": [ - { - "name": "median_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "var_samp_str", - "components": [ - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_samp/var_samp.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_samp/var_samp.json deleted file mode 100644 index 00dc5578e..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/var_samp/var_samp.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "datasets": [ - { - "name": "median_data", - "source": "csv:median_variance.csv", - "structure": "median_str" - }, - { - "name": "expected", - "structure": "var_samp_str", - "source": "csv:var_samp.csv" - } - ], - "structures": [ - { - "name": "median_str", - "components": [ - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - }, - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - }, - { - "name": "var_samp_str", - "components": [ - { - "name": "me_2", - "role": "Measure" - }, - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_2", - "domain": "string" - }, - { - "name": "res2", - "domain": "boolean" - }, - { - "name": "id_3", - "domain": "date" - }, - { - "name": "res1", - "domain": "boolean" - }, - { - "name": "me_2", - "domain": "number" - }, - { - "name": "me_1", - "domain": "number" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_1/xor_1-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_1/xor_1-spark.json deleted file mode 100644 index 0bbd7bce9..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_1/xor_1-spark.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test5", - "source": "spark:csv:boolean_test5.csv", - "structure": "boolean_test5_str" - }, - { - "name": "boolean_test4", - "source": "spark:csv:boolean_test4.csv", - "structure": "boolean_test4_str" - }, - { - "name": "expected", - "structure": "xor_1_str", - "source": "spark:csv:xor_1.csv" - } - ], - "structures": [ - { - "name": "xor_1_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - }, - { - "name": "boolean_test5_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - }, - { - "name": "boolean_test4_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "number" - }, - { - "name": "id_4", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_1/xor_1.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_1/xor_1.json deleted file mode 100644 index f05e18ff4..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_1/xor_1.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test5", - "source": "csv:boolean_test5.csv", - "structure": "boolean_test5_str" - }, - { - "name": "boolean_test4", - "source": "csv:boolean_test4.csv", - "structure": "boolean_test4_str" - }, - { - "name": "expected", - "structure": "xor_1_str", - "source": "csv:xor_1.csv" - } - ], - "structures": [ - { - "name": "xor_1_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - }, - { - "name": "boolean_test5_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - }, - { - "name": "boolean_test4_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "number" - }, - { - "name": "id_4", - "domain": "number" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_1/xor_1.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_1/xor_1.vtl deleted file mode 100644 index 639e886e6..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_1/xor_1.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= boolean_test4 xor boolean_test5; diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_2/xor_2-spark.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_2/xor_2-spark.json deleted file mode 100644 index 8dab72eff..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_2/xor_2-spark.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test4", - "source": "spark:csv:boolean_test4.csv", - "structure": "boolean_test4_str" - }, - { - "name": "expected", - "structure": "xor_2_str", - "source": "spark:csv:xor_2.csv" - } - ], - "structures": [ - { - "name": "xor_2_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "xorf", - "role": "Measure" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - }, - { - "name": "boolean_test4_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "integer" - }, - { - "name": "id_4", - "domain": "integer" - }, - { - "name": "xorf", - "domain": "boolean" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_2/xor_2.json b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_2/xor_2.json deleted file mode 100644 index a2a3dad63..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_2/xor_2.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "datasets": [ - { - "name": "boolean_test4", - "source": "csv:boolean_test4.csv", - "structure": "boolean_test4_str" - }, - { - "name": "expected", - "structure": "xor_2_str", - "source": "csv:xor_2.csv" - } - ], - "structures": [ - { - "name": "xor_2_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "xorf", - "role": "Measure" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - }, - { - "name": "boolean_test4_str", - "components": [ - { - "name": "id_2", - "role": "Identifier" - }, - { - "name": "id_4", - "role": "Identifier" - }, - { - "name": "me_1", - "role": "Measure" - }, - { - "name": "id_3", - "role": "Identifier" - }, - { - "name": "id_1", - "role": "Identifier" - } - ] - } - ], - "variables": [ - { - "name": "id_1", - "domain": "string" - }, - { - "name": "id_3", - "domain": "string" - }, - { - "name": "me_1", - "domain": "boolean" - }, - { - "name": "id_2", - "domain": "integer" - }, - { - "name": "id_4", - "domain": "integer" - }, - { - "name": "xorf", - "domain": "boolean" - }, - { - "name": "bool_var", - "domain": "boolean" - } - ] -} diff --git a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_2/xor_2.vtl b/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_2/xor_2.vtl deleted file mode 100644 index a1d7b7ab8..000000000 --- a/vtl-bundles/vtl-coverage/src/test/resources/it/bancaditalia/oss/vtl/coverage/tests/xor_2/xor_2.vtl +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright © 2020 Banca D'Italia - * - * Licensed under the EUPL, Version 1.2 (the "License"); - * You may not use this work except in compliance with the - * License. - * You may obtain a copy of the License at: - * - * https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt - * - * Unless required by applicable law or agreed to in - * writing, software distributed under the License is - * distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. - * - * See the License for the specific language governing - * permissions and limitations under the License. - */ -test_result:= boolean_test4[calc xorF:= Me_1 xor false];