Search in sources :

Example 1 with Enumeration

use of org.finos.legend.engine.protocol.pure.v1.model.packageableElement.domain.Enumeration in project legend-engine by finos.

the class TestExecutionPlan method testTDSWithEnum.

@Test
public void testTDSWithEnum() throws Exception {
    // executionPlan(|meta::relational::tests::mapping::enumeration::model::domain::Employee.all()->project(a|$a.type, 'xx'), meta::relational::tests::mapping::enumeration::model::mapping::employeeTestMapping, meta::relational::tests::mapping::enumeration::enumTestRuntime())->meta::alloy::protocol::vX_X_X::transformation::fromPureGraph::executionPlan::transformPlan()->toJSON([], 1000, config(false, false, true, true));
    String plan = "{\n" + "  \"rootExecutionNode\": {\n" + "    \"sqlQuery\": \"select \\\"root\\\".type as \\\"xx\\\" from employeeTable as \\\"root\\\"\",\n" + "    \"resultColumns\": [\n" + "      {\n" + "        \"label\": \"\\\"xx\\\"\",\n" + "        \"dataType\": \"VARCHAR(20)\"\n" + "      }\n" + "    ],\n" + "    \"connection\": {\n" + "       \"_type\": \"RelationalDatabaseConnection\",\n" + "       \"type\": \"H2\",\n" + "       \"authenticationStrategy\" : {\n" + "           \"_type\" : \"test\"\n" + "       },\n" + "       \"datasourceSpecification\" : {\n" + "           \"_type\" : \"static\",\n" + "           \"databaseName\" : \"testDB\",\n" + "           \"host\":\"127.0.0.1\",\n" + "           \"port\" : \"" + serverPort + "\"\n" + "       }\n" + "    }," + "    \"_type\": \"relational\",\n" + "    \"resultType\": {\n" + "      \"tdsColumns\": [\n" + "        {\n" + "          \"name\": \"xx\",\n" + "          \"type\": \"EmployeeType\",\n" + "          \"relationalType\": \"VARCHAR(20)\",\n" + "          \"enumMapping\": {\n" + "            \"CONTRACT\": [\n" + "              \"FTC\",\n" + "              \"FTO\"\n" + "            ],\n" + "            \"FULL_TIME\": [\n" + "              \"FTE\"\n" + "            ]\n" + "          }\n" + "        }\n" + "      ],\n" + "      \"_type\": \"tds\"\n" + "    }\n" + "  }\n" + "}";
    SingleExecutionPlan executionPlan = objectMapper.readValue(plan, SingleExecutionPlan.class);
    RelationalResult result = (RelationalResult) executionPlan.rootExecutionNode.accept(new ExecutionNodeExecutor(null, new ExecutionState(Maps.mutable.empty(), Lists.mutable.withAll(executionPlan.templateFunctions), Lists.mutable.with(new RelationalStoreExecutionState(new RelationalStoreState(serverPort))))));
    Assert.assertEquals("{\"builder\": {\"_type\":\"tdsBuilder\",\"columns\":[{\"name\":\"xx\",\"type\":\"EmployeeType\",\"relationalType\":\"VARCHAR(20)\"}]}, \"activities\": [{\"_type\":\"relational\",\"sql\":\"select \\\"root\\\".type as \\\"xx\\\" from employeeTable as \\\"root\\\"\"}], \"result\" : {\"columns\" : [\"xx\"], \"rows\" : [{\"values\": [\"CONTRACT\"]},{\"values\": [\"FULL_TIME\"]},{\"values\": [\"CONTRACT\"]}]}}", result.flush(new RelationalResultToJsonDefaultSerializer(result)));
}
Also used : RelationalStoreExecutionState(org.finos.legend.engine.plan.execution.stores.relational.plugin.RelationalStoreExecutionState) ExecutionState(org.finos.legend.engine.plan.execution.nodes.state.ExecutionState) RelationalStoreExecutionState(org.finos.legend.engine.plan.execution.stores.relational.plugin.RelationalStoreExecutionState) RelationalResult(org.finos.legend.engine.plan.execution.stores.relational.result.RelationalResult) RelationalResultToJsonDefaultSerializer(org.finos.legend.engine.plan.execution.stores.relational.serialization.RelationalResultToJsonDefaultSerializer) ExecutionNodeExecutor(org.finos.legend.engine.plan.execution.nodes.ExecutionNodeExecutor) RelationalStoreState(org.finos.legend.engine.plan.execution.stores.relational.plugin.RelationalStoreState) SingleExecutionPlan(org.finos.legend.engine.protocol.pure.v1.model.executionPlan.SingleExecutionPlan) Test(org.junit.Test)

Example 2 with Enumeration

use of org.finos.legend.engine.protocol.pure.v1.model.packageableElement.domain.Enumeration in project legend-engine by finos.

the class TestExecutionPlan method testClassWithEnum.

@Test
public void testClassWithEnum() throws Exception {
    // executionPlan(|meta::relational::tests::mapping::enumeration::model::domain::Employee.all(), meta::relational::tests::mapping::enumeration::model::mapping::employeeTestMapping, meta::relational::tests::mapping::enumeration::enumTestRuntime())->meta::alloy::protocol::vX_X_X::transformation::fromPureGraph::executionPlan::transformPlan()->toJSON([], 1000, config(false, false, true, true));
    String plan = "{\n" + "  \"rootExecutionNode\": {\n" + "    \"sqlQuery\": \"select \\\"root\\\".id as \\\"pk_0\\\", \\\"root\\\".id as \\\"id\\\", \\\"root\\\".name as \\\"name\\\", \\\"root\\\".doh as \\\"dateOfHire\\\", \\\"root\\\".type as \\\"type\\\", \\\"root\\\".active as \\\"active\\\" from employeeTable as \\\"root\\\"\",\n" + "    \"resultColumns\": [\n" + "      {\n" + "        \"label\": \"\\\"pk_0\\\"\",\n" + "        \"dataType\": \"INTEGER\"\n" + "      },\n" + "      {\n" + "        \"label\": \"\\\"id\\\"\",\n" + "        \"dataType\": \"INTEGER\"\n" + "      },\n" + "      {\n" + "        \"label\": \"\\\"name\\\"\",\n" + "        \"dataType\": \"VARCHAR(200)\"\n" + "      },\n" + "      {\n" + "        \"label\": \"\\\"dateOfHire\\\"\",\n" + "        \"dataType\": \"DATE\"\n" + "      },\n" + "      {\n" + "        \"label\": \"\\\"type\\\"\",\n" + "        \"dataType\": \"VARCHAR(20)\"\n" + "      },\n" + "      {\n" + "        \"label\": \"\\\"active\\\"\",\n" + "        \"dataType\": \"INTEGER\"\n" + "      }\n" + "    ],\n" + "    \"connection\": {\n" + "       \"_type\": \"RelationalDatabaseConnection\",\n" + "       \"type\": \"H2\",\n" + "       \"authenticationStrategy\" : {\n" + "           \"_type\" : \"test\"\n" + "       },\n" + "       \"datasourceSpecification\" : {\n" + "           \"_type\" : \"static\",\n" + "           \"databaseName\" : \"testDB\",\n" + "           \"host\":\"127.0.0.1\",\n" + "           \"port\" : \"" + serverPort + "\"\n" + "       }\n" + "    }," + "    \"_type\": \"relational\",\n" + "    \"resultType\": {\n" + "      \"class\": \"meta::relational::tests::mapping::enumeration::model::domain::Employee\",\n" + "      \"setImplementations\": [\n" + "        {\n" + "          \"class\": \"meta::relational::tests::mapping::enumeration::model::domain::Employee\",\n" + "          \"mapping\": \"meta::relational::tests::mapping::enumeration::model::mapping::employeeTestMapping\",\n" + "          \"id\": \"meta_relational_tests_mapping_enumeration_model_domain_Employee\",\n" + "          \"propertyMappings\": [\n" + "            {\n" + "              \"property\": \"id\",\n" + "              \"type\": \"Integer\"\n" + "            },\n" + "            {\n" + "              \"property\": \"name\",\n" + "              \"type\": \"String\"\n" + "            },\n" + "            {\n" + "              \"property\": \"dateOfHire\",\n" + "              \"type\": \"Date\"\n" + "            },\n" + "            {\n" + "              \"property\": \"type\",\n" + "              \"type\": \"meta::relational::tests::mapping::enumeration::model::domain::EmployeeType\",\n" + "              \"enumMapping\": {\n" + "                \"CONTRACT\": [\n" + "                  \"FTC\",\n" + "                  \"FTO\"\n" + "                ],\n" + "                \"FULL_TIME\": [\n" + "                  \"FTE\"\n" + "                ]\n" + "              }\n" + "            },\n" + "            {\n" + "              \"property\": \"active\",\n" + "              \"type\": \"meta::relational::tests::mapping::enumeration::model::domain::YesNo\",\n" + "              \"enumMapping\": {\n" + "                \"YES\": [\n" + "                  \"1\"\n" + "                ],\n" + "                \"NO\": [\n" + "                  \"0\"\n" + "                ]\n" + "              }\n" + "            }\n" + "          ]\n" + "        }\n" + "      ],\n" + "      \"_type\": \"class\"\n" + "    }\n" + "  }\n" + "}";
    SingleExecutionPlan executionPlan = objectMapper.readValue(plan, SingleExecutionPlan.class);
    RelationalResult result = (RelationalResult) executionPlan.rootExecutionNode.accept(new ExecutionNodeExecutor(null, new ExecutionState(Maps.mutable.empty(), Lists.mutable.withAll(executionPlan.templateFunctions), Lists.mutable.with(new RelationalStoreExecutionState(new RelationalStoreState(serverPort))))));
    Assert.assertEquals("{\"builder\": {\"_type\":\"classBuilder\",\"mapping\":\"meta::relational::tests::mapping::enumeration::model::mapping::employeeTestMapping\",\"classMappings\":[{\"setImplementationId\":\"meta_relational_tests_mapping_enumeration_model_domain_Employee\",\"properties\":[{\"property\":\"id\",\"type\":\"Integer\"},{\"property\":\"name\",\"type\":\"String\"},{\"property\":\"dateOfHire\",\"type\":\"Date\"},{\"property\":\"type\",\"type\":\"meta::relational::tests::mapping::enumeration::model::domain::EmployeeType\"},{\"property\":\"active\",\"type\":\"meta::relational::tests::mapping::enumeration::model::domain::YesNo\"}],\"class\":\"meta::relational::tests::mapping::enumeration::model::domain::Employee\"}],\"class\":\"meta::relational::tests::mapping::enumeration::model::domain::Employee\"}, \"activities\": [{\"_type\":\"relational\",\"sql\":\"select \\\"root\\\".id as \\\"pk_0\\\", \\\"root\\\".id as \\\"id\\\", \\\"root\\\".name as \\\"name\\\", \\\"root\\\".doh as \\\"dateOfHire\\\", \\\"root\\\".type as \\\"type\\\", \\\"root\\\".active as \\\"active\\\" from employeeTable as \\\"root\\\"\"}], \"result\" : {\"columns\" : [\"pk_0\",\"id\",\"name\",\"dateOfHire\",\"type\",\"active\"], \"rows\" : [{\"values\": [1,1,\"Alice\",\"1983-03-15T00:00:00.000000000+0000\",\"CONTRACT\",\"YES\"]},{\"values\": [2,2,\"Bob\",\"2003-07-19T00:00:00.000000000+0000\",\"FULL_TIME\",\"NO\"]},{\"values\": [3,3,\"Curtis\",\"2012-08-25T00:00:00.000000000+0000\",\"CONTRACT\",null]}]}}", result.flush(new RelationalResultToJsonDefaultSerializer(result)));
}
Also used : RelationalStoreExecutionState(org.finos.legend.engine.plan.execution.stores.relational.plugin.RelationalStoreExecutionState) ExecutionState(org.finos.legend.engine.plan.execution.nodes.state.ExecutionState) RelationalStoreExecutionState(org.finos.legend.engine.plan.execution.stores.relational.plugin.RelationalStoreExecutionState) RelationalResult(org.finos.legend.engine.plan.execution.stores.relational.result.RelationalResult) RelationalResultToJsonDefaultSerializer(org.finos.legend.engine.plan.execution.stores.relational.serialization.RelationalResultToJsonDefaultSerializer) ExecutionNodeExecutor(org.finos.legend.engine.plan.execution.nodes.ExecutionNodeExecutor) RelationalStoreState(org.finos.legend.engine.plan.execution.stores.relational.plugin.RelationalStoreState) SingleExecutionPlan(org.finos.legend.engine.protocol.pure.v1.model.executionPlan.SingleExecutionPlan) Test(org.junit.Test)

Example 3 with Enumeration

use of org.finos.legend.engine.protocol.pure.v1.model.packageableElement.domain.Enumeration in project legend-engine by finos.

the class TestPlanExecutionWithAuthenticationFlow method testPlanExecutionWithSnowflakeKeyPair.

@Ignore
public // TODO - fix this test. For now it registers a fake key just to verify just to verify credential resolution
void testPlanExecutionWithSnowflakeKeyPair() throws Exception {
    String connectionSpec = "\"connection\": {\n" + "       \"_type\": \"RelationalDatabaseConnection\",\n" + "       \"type\": \"Snowflake\",\n" + "       \"authenticationStrategy\" : {\n" + "           \"_type\" : \"snowflakePublic\",\n" + "           \"publicUserName\" : \"fakeUser1\",\n" + "           \"privateKeyVaultReference\" : \"fakePrivateKeyRef1\",\n" + "           \"passPhraseVaultReference\" : \"fakePassphraseRef1\"\n" + "       },\n" + "       \"datasourceSpecification\" : {\n" + "           \"_type\" : \"snowflake\",\n" + "           \"accountName\" : \"ki79827\",\n" + "           \"region\" : \"us-east-2\",\n" + "           \"warehouseName\" : \"LEGENDRO_WH\",\n" + "           \"databaseName\" : \"KNOEMA_RENEWABLES_DATA_ATLAS\",\n" + "           \"cloudType\" : \"aws\"\n" + "       }\n" + "    }";
    InMemoryVaultForTesting inMemoryVault = new InMemoryVaultForTesting();
    inMemoryVault.setValue("fakePrivateKeyRef1", "notused");
    inMemoryVault.setValue("fakePassphraseRef1", "notused");
    Vault.INSTANCE.registerImplementation(inMemoryVault);
    String plan = this.buildPlan(connectionSpec);
    try {
        SingleExecutionPlan executionPlan = objectMapper.readValue(plan, SingleExecutionPlan.class);
        RelationalResult result = (RelationalResult) executionPlan.rootExecutionNode.accept(new ExecutionNodeExecutor(null, new ExecutionState(Maps.mutable.empty(), Lists.mutable.withAll(executionPlan.templateFunctions), Lists.mutable.with(new RelationalStoreExecutionState(new RelationalStoreState(port))))));
        Assert.assertEquals("{\"builder\": {\"_type\":\"classBuilder\",\"mapping\":\"meta::relational::tests::mapping::enumeration::model::mapping::employeeTestMapping\",\"classMappings\":[{\"setImplementationId\":\"meta_relational_tests_mapping_enumeration_model_domain_Employee\",\"properties\":[{\"property\":\"id\",\"type\":\"Integer\"},{\"property\":\"name\",\"type\":\"String\"},{\"property\":\"dateOfHire\",\"type\":\"Date\"},{\"property\":\"type\",\"type\":\"meta::relational::tests::mapping::enumeration::model::domain::EmployeeType\"},{\"property\":\"active\",\"type\":\"meta::relational::tests::mapping::enumeration::model::domain::YesNo\"}],\"class\":\"meta::relational::tests::mapping::enumeration::model::domain::Employee\"}],\"class\":\"meta::relational::tests::mapping::enumeration::model::domain::Employee\"}, \"activities\": [{\"_type\":\"relational\",\"sql\":\"select \\\"root\\\".id as \\\"pk_0\\\", \\\"root\\\".id as \\\"id\\\", \\\"root\\\".name as \\\"name\\\", \\\"root\\\".doh as \\\"dateOfHire\\\", \\\"root\\\".type as \\\"type\\\", \\\"root\\\".active as \\\"active\\\" from employeeTable as \\\"root\\\"\"}], \"result\" : {\"columns\" : [\"pk_0\",\"id\",\"name\",\"dateOfHire\",\"type\",\"active\"], \"rows\" : [{\"values\": [1,1,\"Alice\",\"1983-03-15T00:00:00.000000000+0000\",\"CONTRACT\",\"YES\"]},{\"values\": [2,2,\"Bob\",\"2003-07-19T00:00:00.000000000+0000\",\"FULL_TIME\",\"NO\"]},{\"values\": [3,3,\"Curtis\",\"2012-08-25T00:00:00.000000000+0000\",\"CONTRACT\",null]}]}}", result.flush(new RelationalResultToJsonDefaultSerializer(result)));
    } catch (Exception e) {
        assertTrue(e.getMessage().contains("Failed to initialize pool: net.snowflake.client.jdbc.SnowflakeSQLLoggedException: Private key provided is invalid or not supported: Use java.security.interfaces.RSAPrivateCrtKey.class for the private key"));
    }
}
Also used : RelationalStoreExecutionState(org.finos.legend.engine.plan.execution.stores.relational.plugin.RelationalStoreExecutionState) ExecutionState(org.finos.legend.engine.plan.execution.nodes.state.ExecutionState) RelationalStoreExecutionState(org.finos.legend.engine.plan.execution.stores.relational.plugin.RelationalStoreExecutionState) RelationalResult(org.finos.legend.engine.plan.execution.stores.relational.result.RelationalResult) RelationalResultToJsonDefaultSerializer(org.finos.legend.engine.plan.execution.stores.relational.serialization.RelationalResultToJsonDefaultSerializer) InMemoryVaultForTesting(org.finos.legend.engine.authentication.vaults.InMemoryVaultForTesting) ExecutionNodeExecutor(org.finos.legend.engine.plan.execution.nodes.ExecutionNodeExecutor) RelationalStoreState(org.finos.legend.engine.plan.execution.stores.relational.plugin.RelationalStoreState) SingleExecutionPlan(org.finos.legend.engine.protocol.pure.v1.model.executionPlan.SingleExecutionPlan)

Example 4 with Enumeration

use of org.finos.legend.engine.protocol.pure.v1.model.packageableElement.domain.Enumeration in project legend-engine by finos.

the class TestPlanExecutionWithAuthenticationFlow method testPlanExecutionWithLocalH2.

@Test
public void testPlanExecutionWithLocalH2() throws Exception {
    Connection connection = setupH2Connection();
    String connectionSpec = "\"connection\": {\n" + "       \"_type\": \"RelationalDatabaseConnection\",\n" + "       \"type\": \"H2\",\n" + "       \"authenticationStrategy\" : {\n" + "           \"_type\" : \"test\"\n" + "       },\n" + "       \"datasourceSpecification\" : {\n" + "           \"_type\" : \"h2Local\"\n" + "       }\n" + "    }";
    String plan = this.buildPlan(connectionSpec);
    SingleExecutionPlan executionPlan = objectMapper.readValue(plan, SingleExecutionPlan.class);
    RelationalResult result = (RelationalResult) executionPlan.rootExecutionNode.accept(new ExecutionNodeExecutor(null, new ExecutionState(Maps.mutable.empty(), Lists.mutable.withAll(executionPlan.templateFunctions), Lists.mutable.with(new RelationalStoreExecutionState(new RelationalStoreState(port))))));
    Assert.assertEquals("{\"builder\": {\"_type\":\"classBuilder\",\"mapping\":\"meta::relational::tests::mapping::enumeration::model::mapping::employeeTestMapping\",\"classMappings\":[{\"setImplementationId\":\"meta_relational_tests_mapping_enumeration_model_domain_Employee\",\"properties\":[{\"property\":\"id\",\"type\":\"Integer\"},{\"property\":\"name\",\"type\":\"String\"},{\"property\":\"dateOfHire\",\"type\":\"Date\"},{\"property\":\"type\",\"type\":\"meta::relational::tests::mapping::enumeration::model::domain::EmployeeType\"},{\"property\":\"active\",\"type\":\"meta::relational::tests::mapping::enumeration::model::domain::YesNo\"}],\"class\":\"meta::relational::tests::mapping::enumeration::model::domain::Employee\"}],\"class\":\"meta::relational::tests::mapping::enumeration::model::domain::Employee\"}, \"activities\": [{\"_type\":\"relational\",\"sql\":\"select \\\"root\\\".id as \\\"pk_0\\\", \\\"root\\\".id as \\\"id\\\", \\\"root\\\".name as \\\"name\\\", \\\"root\\\".doh as \\\"dateOfHire\\\", \\\"root\\\".type as \\\"type\\\", \\\"root\\\".active as \\\"active\\\" from employeeTable as \\\"root\\\"\"}], \"result\" : {\"columns\" : [\"pk_0\",\"id\",\"name\",\"dateOfHire\",\"type\",\"active\"], \"rows\" : [{\"values\": [1,1,\"Alice\",\"1983-03-15T00:00:00.000000000+0000\",\"CONTRACT\",\"YES\"]},{\"values\": [2,2,\"Bob\",\"2003-07-19T00:00:00.000000000+0000\",\"FULL_TIME\",\"NO\"]},{\"values\": [3,3,\"Curtis\",\"2012-08-25T00:00:00.000000000+0000\",\"CONTRACT\",null]}]}}", result.flush(new RelationalResultToJsonDefaultSerializer(result)));
    closeConnection(connection);
}
Also used : RelationalStoreExecutionState(org.finos.legend.engine.plan.execution.stores.relational.plugin.RelationalStoreExecutionState) ExecutionState(org.finos.legend.engine.plan.execution.nodes.state.ExecutionState) RelationalStoreExecutionState(org.finos.legend.engine.plan.execution.stores.relational.plugin.RelationalStoreExecutionState) RelationalResult(org.finos.legend.engine.plan.execution.stores.relational.result.RelationalResult) RelationalResultToJsonDefaultSerializer(org.finos.legend.engine.plan.execution.stores.relational.serialization.RelationalResultToJsonDefaultSerializer) Connection(java.sql.Connection) ExecutionNodeExecutor(org.finos.legend.engine.plan.execution.nodes.ExecutionNodeExecutor) RelationalStoreState(org.finos.legend.engine.plan.execution.stores.relational.plugin.RelationalStoreState) SingleExecutionPlan(org.finos.legend.engine.protocol.pure.v1.model.executionPlan.SingleExecutionPlan)

Example 5 with Enumeration

use of org.finos.legend.engine.protocol.pure.v1.model.packageableElement.domain.Enumeration in project legend-engine by finos.

the class HelperRelationalBuilder method processRelationalPropertyMapping.

private static PropertyMapping processRelationalPropertyMapping(RelationalPropertyMapping propertyMapping, CompileContext context, PropertyMappingsImplementation immediateParent, InstanceSetImplementation topParent, MutableList<EmbeddedRelationalInstanceSetImplementation> embeddedRelationalPropertyMappings, RichIterable<EnumerationMapping<Object>> allEnumerationMappings, MutableMap<String, TableAlias> aliasMap) {
    org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.RelationalPropertyMapping rpm = new Root_meta_relational_mapping_RelationalPropertyMapping_Impl("");
    Property property = resolvePropertyForRelationalPropertyMapping(propertyMapping, immediateParent, context);
    if (propertyMapping.bindingTransformer != null) {
        return buildSemiStructuredPropertyMapping(property, propertyMapping, immediateParent, (RootRelationalInstanceSetImplementation) topParent, embeddedRelationalPropertyMappings, aliasMap, context);
    }
    org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.RelationalPropertyMapping res = rpm._property(property)._localMappingProperty(propertyMapping.localMappingProperty != null)._relationalOperationElement(processRelationalOperationElement(propertyMapping.relationalOperation, context, aliasMap, FastList.newList()))._sourceSetImplementationId(HelperRelationalBuilder.getPropertyMappingSourceId(propertyMapping, immediateParent, property, context))._targetSetImplementationId(HelperRelationalBuilder.getPropertyMappingTargetId(propertyMapping, immediateParent, property, context))._owner(immediateParent);
    rpm.setSourceInformation(SourceInformationHelper.toM3SourceInformation(propertyMapping.sourceInformation));
    if (propertyMapping.enumMappingId != null) {
        EnumerationMapping<Object> eMap = allEnumerationMappings.select(e -> e._name().equals(propertyMapping.enumMappingId)).getFirst();
        Assert.assertTrue(eMap != null, () -> "Can't find enumeration mapping '" + propertyMapping.enumMappingId + "'");
        res = res._transformer(eMap);
    }
    return res;
}
Also used : Maps(org.eclipse.collections.impl.factory.Maps) Decimal(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Decimal) RootRelationalInstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.RootRelationalInstanceSetImplementation) Predicate(org.eclipse.collections.api.block.predicate.Predicate) Join(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.join.Join) BusinessMilestoning(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.BusinessMilestoning) SemiStructuredEmbeddedRelationalInstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.SemiStructuredEmbeddedRelationalInstanceSetImplementation) PropertyMapping(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.PropertyMapping) RichIterable(org.eclipse.collections.api.RichIterable) EnumerationMapping(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.EnumerationMapping) Root_meta_relational_metamodel_datatype_TinyInt_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_TinyInt_Impl) Relation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Relation) Root_meta_relational_mapping_ColumnMapping_Impl(org.finos.legend.pure.generated.Root_meta_relational_mapping_ColumnMapping_Impl) Root_meta_relational_metamodel_datatype_Numeric_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_Numeric_Impl) Root_meta_relational_metamodel_datatype_Varchar_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_Varchar_Impl) Root_meta_relational_metamodel_join_JoinTreeNode_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_join_JoinTreeNode_Impl) GroupByMapping(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.GroupByMapping) ElementWithJoins(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.operation.ElementWithJoins) Date(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Date) Root_meta_relational_metamodel_MultiGrainFilter_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_MultiGrainFilter_Impl) AssociationImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.AssociationImplementation) MappingClass(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.MappingClass) UnifiedMap(org.eclipse.collections.impl.map.mutable.UnifiedMap) Schema(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Schema) Numeric(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Numeric) Root_meta_pure_metamodel_function_property_Property_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_function_property_Property_Impl) RelationalOperationElementWithJoin(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.RelationalOperationElementWithJoin) Class(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Class) Root_meta_pure_functions_collection_Pair_Impl(org.finos.legend.pure.generated.Root_meta_pure_functions_collection_Pair_Impl) NamedRelationAccessor(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.NamedRelationAccessor) Other(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Other) ColumnAccessor(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.ColumnAccessor) Mapping(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.Mapping) GenericType(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.GenericType) EngineException(org.finos.legend.engine.shared.core.operational.errorManagement.EngineException) TableAliasColumn(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAliasColumn) ListIterable(org.eclipse.collections.api.list.ListIterable) Root_meta_relational_mapping_GroupByMapping_Impl(org.finos.legend.pure.generated.Root_meta_relational_mapping_GroupByMapping_Impl) Root_meta_relational_metamodel_datatype_Other_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_Other_Impl) PropertyMappingsImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.PropertyMappingsImplementation) Function(org.eclipse.collections.api.block.function.Function) Root_meta_relational_metamodel_TableAliasColumn_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_TableAliasColumn_Impl) Procedure(org.eclipse.collections.api.block.procedure.Procedure) Root_meta_external_shared_format_binding_validation_SuccessfulBindingDetail(org.finos.legend.pure.generated.Root_meta_external_shared_format_binding_validation_SuccessfulBindingDetail) View(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.View) FastList(org.eclipse.collections.impl.list.mutable.FastList) LinkedHashMap(java.util.LinkedHashMap) VarChar(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.VarChar) MutableMap(org.eclipse.collections.api.map.MutableMap) MilestoningStereotype(org.finos.legend.pure.m3.compiler.postprocessing.processor.milestoning.MilestoningStereotype) TreeNode(org.finos.legend.pure.m3.coreinstance.meta.pure.functions.collection.TreeNode) Root_meta_relational_metamodel_relation_Table_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_relation_Table_Impl) Float(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Float) TablePtr(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.mapping.TablePtr) Root_meta_relational_metamodel_DynaFunction_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_DynaFunction_Impl) Binary(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Binary) Root_meta_pure_metamodel_relationship_Generalization_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_relationship_Generalization_Impl) Predicates(org.eclipse.collections.impl.block.factory.Predicates) Timestamp(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Timestamp) DynaFunction(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.DynaFunction) Predicates2(org.eclipse.collections.impl.block.factory.Predicates2) ExternalFormatExtension(org.finos.legend.engine.external.shared.format.model.ExternalFormatExtension) DataType(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.DataType) ListIterate(org.eclipse.collections.impl.utility.ListIterate) CoreInstance(org.finos.legend.pure.m4.coreinstance.CoreInstance) OtherwiseEmbeddedRelationalPropertyMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.mapping.OtherwiseEmbeddedRelationalPropertyMapping) SetImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.SetImplementation) Literal(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Literal) EmbeddedRelationalInstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.EmbeddedRelationalInstanceSetImplementation) Root_meta_relational_mapping_OtherwiseEmbeddedRelationalInstanceSetImplementation_Impl(org.finos.legend.pure.generated.Root_meta_relational_mapping_OtherwiseEmbeddedRelationalInstanceSetImplementation_Impl) Root_meta_relational_metamodel_relation_View_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_relation_View_Impl) RelationalOperationElement(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.RelationalOperationElement) Table(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Table) ImmutableList(org.eclipse.collections.api.list.ImmutableList) RelationalClassMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.mapping.RelationalClassMapping) RelationalPropertyMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.mapping.RelationalPropertyMapping) TableAlias(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAlias) Operation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.operation.Operation) Varbinary(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Varbinary) Root_meta_relational_metamodel_TableAlias_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_TableAlias_Impl) Root_meta_relational_metamodel_operation_SemiStructuredPropertyAccess_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_operation_SemiStructuredPropertyAccess_Impl) UnifiedSet(org.eclipse.collections.impl.set.mutable.UnifiedSet) org.finos.legend.pure.generated.core_pure_model_modelUnit(org.finos.legend.pure.generated.core_pure_model_modelUnit) Root_meta_relational_mapping_InlineEmbeddedRelationalInstanceSetImplementation_Impl(org.finos.legend.pure.generated.Root_meta_relational_mapping_InlineEmbeddedRelationalInstanceSetImplementation_Impl) EngineErrorType(org.finos.legend.engine.protocol.pure.v1.model.context.EngineErrorType) Root_meta_external_shared_format_binding_BindingTransformer(org.finos.legend.pure.generated.Root_meta_external_shared_format_binding_BindingTransformer) Association(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.relationship.Association) Multimap(org.eclipse.collections.api.multimap.Multimap) Predicate2(org.eclipse.collections.api.block.predicate.Predicate2) SetIterable(org.eclipse.collections.api.set.SetIterable) SemiStructured(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.SemiStructured) Root_meta_relational_metamodel_datatype_SmallInt_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_SmallInt_Impl) Generalization(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.relationship.Generalization) Root_meta_relational_mapping_RelationalPropertyMapping_Impl(org.finos.legend.pure.generated.Root_meta_relational_mapping_RelationalPropertyMapping_Impl) ColumnMapping(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.ColumnMapping) MutableList(org.eclipse.collections.api.list.MutableList) Root_meta_external_shared_format_binding_Binding(org.finos.legend.pure.generated.Root_meta_external_shared_format_binding_Binding) Root_meta_relational_metamodel_SQLNull_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_SQLNull_Impl) Root_meta_pure_metamodel_valuespecification_InstanceValue_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_valuespecification_InstanceValue_Impl) RootRelationalClassMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.mapping.RootRelationalClassMapping) MutableSet(org.eclipse.collections.api.set.MutableSet) Pair(org.finos.legend.pure.m3.coreinstance.meta.pure.functions.collection.Pair) Filter(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Filter) InlineEmbeddedRelationalInstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.InlineEmbeddedRelationalInstanceSetImplementation) Property(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.Property) Store(org.finos.legend.pure.m3.coreinstance.meta.pure.store.Store) Root_meta_relational_mapping_SemiStructuredRelationalPropertyMapping_Impl(org.finos.legend.pure.generated.Root_meta_relational_mapping_SemiStructuredRelationalPropertyMapping_Impl) Tuples(org.eclipse.collections.impl.tuple.Tuples) InstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.pure.mapping.InstanceSetImplementation) Root_meta_relational_metamodel_Schema_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_Schema_Impl) Root_meta_relational_metamodel_LiteralList_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_LiteralList_Impl) Root_meta_relational_metamodel_Column_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_Column_Impl) org.finos.legend.pure.generated.core_pure_corefunctions_metaExtension(org.finos.legend.pure.generated.core_pure_corefunctions_metaExtension) Root_meta_external_shared_format_binding_BindingTransformer_Impl(org.finos.legend.pure.generated.Root_meta_external_shared_format_binding_BindingTransformer_Impl) Root_meta_relational_metamodel_datatype_Real_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_Real_Impl) SourceInformation(org.finos.legend.engine.protocol.pure.v1.model.SourceInformation) Root_meta_relational_metamodel_join_Join_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_join_Join_Impl) OtherwiseEmbeddedRelationalInstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.OtherwiseEmbeddedRelationalInstanceSetImplementation) JoinPointer(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.operation.JoinPointer) Root_meta_relational_metamodel_datatype_Decimal_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_Decimal_Impl) AggregationAwarePropertyMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.mapping.aggregationAware.AggregationAwarePropertyMapping) SmallInt(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.SmallInt) RelationalInstanceSetImplementation(org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.RelationalInstanceSetImplementation) DynaFunc(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.operation.DynaFunc) Root_meta_pure_mapping_MappingClass_Impl(org.finos.legend.pure.generated.Root_meta_pure_mapping_MappingClass_Impl) List(java.util.List) Char(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Char) SchemaAccessor(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.SchemaAccessor) Lists(org.eclipse.collections.impl.factory.Lists) Optional(java.util.Optional) Root_meta_relational_metamodel_datatype_Varbinary_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_Varbinary_Impl) Root_meta_relational_metamodel_relation_BusinessMilestoning_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_relation_BusinessMilestoning_Impl) Root_meta_pure_metamodel_type_Class_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_type_Class_Impl) Root_meta_relational_metamodel_Filter_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_Filter_Impl) Assert(org.finos.legend.engine.shared.core.operational.Assert) Root_meta_relational_metamodel_relation_BusinessSnapshotMilestoning_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_relation_BusinessSnapshotMilestoning_Impl) ProcessingMilestoning(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.ProcessingMilestoning) EmbeddedRelationalPropertyMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.mapping.EmbeddedRelationalPropertyMapping) Root_meta_relational_mapping_FilterMapping_Impl(org.finos.legend.pure.generated.Root_meta_relational_mapping_FilterMapping_Impl) Database(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Database) InlineEmbeddedPropertyMapping(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.mapping.InlineEmbeddedPropertyMapping) Root_meta_external_shared_format_binding_validation_BindingDetail(org.finos.legend.pure.generated.Root_meta_external_shared_format_binding_validation_BindingDetail) Root_meta_relational_mapping_SemiStructuredEmbeddedRelationalInstanceSetImplementation_Impl(org.finos.legend.pure.generated.Root_meta_relational_mapping_SemiStructuredEmbeddedRelationalInstanceSetImplementation_Impl) Function0(org.eclipse.collections.api.block.function.Function0) BigInt(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.BigInt) Bit(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Bit) Real(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Real) Column(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Column) PureDate(org.finos.legend.pure.m4.coreinstance.primitive.date.PureDate) Root_meta_relational_metamodel_RelationalOperationElementWithJoin_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_RelationalOperationElementWithJoin_Impl) JoinTreeNode(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.join.JoinTreeNode) Root_meta_pure_metamodel_type_generics_GenericType_Impl(org.finos.legend.pure.generated.Root_meta_pure_metamodel_type_generics_GenericType_Impl) Root_meta_relational_metamodel_datatype_Binary_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_Binary_Impl) PackageableElement(org.finos.legend.pure.m3.navigation.PackageableElement.PackageableElement) TinyInt(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.TinyInt) MilestoningFunctions(org.finos.legend.pure.m3.compiler.postprocessing.processor.milestoning.MilestoningFunctions) Double(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.datatype.Double) Type(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Type) Root_meta_relational_metamodel_Literal_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_Literal_Impl) Root_meta_relational_metamodel_relation_ProcessingMilestoning_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_relation_ProcessingMilestoning_Impl) Root_meta_relational_metamodel_datatype_Char_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_Char_Impl) Root_meta_relational_metamodel_datatype_SemiStructured_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_SemiStructured_Impl) Sets(org.eclipse.collections.impl.factory.Sets) org.finos.legend.pure.generated.platform_pure_corefunctions_meta(org.finos.legend.pure.generated.platform_pure_corefunctions_meta) NamedRelation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.NamedRelation) Root_meta_relational_mapping_EmbeddedRelationalInstanceSetImplementation_Impl(org.finos.legend.pure.generated.Root_meta_relational_mapping_EmbeddedRelationalInstanceSetImplementation_Impl) Root_meta_relational_metamodel_datatype_Timestamp_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_datatype_Timestamp_Impl) org.finos.legend.pure.generated.platform_pure_corefunctions_meta(org.finos.legend.pure.generated.platform_pure_corefunctions_meta) Property(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.function.property.Property) Root_meta_relational_mapping_RelationalPropertyMapping_Impl(org.finos.legend.pure.generated.Root_meta_relational_mapping_RelationalPropertyMapping_Impl)

Aggregations

EngineException (org.finos.legend.engine.shared.core.operational.errorManagement.EngineException)8 GenericType (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.GenericType)7 FastList (org.eclipse.collections.impl.list.mutable.FastList)5 EngineErrorType (org.finos.legend.engine.protocol.pure.v1.model.context.EngineErrorType)5 Type (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Type)5 Lists (org.eclipse.collections.impl.factory.Lists)4 ListIterate (org.eclipse.collections.impl.utility.ListIterate)4 ExecutionNodeExecutor (org.finos.legend.engine.plan.execution.nodes.ExecutionNodeExecutor)4 ExecutionState (org.finos.legend.engine.plan.execution.nodes.state.ExecutionState)4 RelationalStoreExecutionState (org.finos.legend.engine.plan.execution.stores.relational.plugin.RelationalStoreExecutionState)4 RelationalStoreState (org.finos.legend.engine.plan.execution.stores.relational.plugin.RelationalStoreState)4 RelationalResult (org.finos.legend.engine.plan.execution.stores.relational.result.RelationalResult)4 RelationalResultToJsonDefaultSerializer (org.finos.legend.engine.plan.execution.stores.relational.serialization.RelationalResultToJsonDefaultSerializer)4 SingleExecutionPlan (org.finos.legend.engine.protocol.pure.v1.model.executionPlan.SingleExecutionPlan)4 Test (org.junit.Test)4 List (java.util.List)3 RichIterable (org.eclipse.collections.api.RichIterable)3 MutableList (org.eclipse.collections.api.list.MutableList)3 Optional (java.util.Optional)2 Function (java.util.function.Function)2