Search in sources :

Example 1 with Relation

use of org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Relation in project legend-pure by finos.

the class DatabaseProcessor method processTable.

static void processTable(CoreInstance table, Matcher matcher, ProcessorState processorState, ProcessorSupport processorSupport) {
    MapIterable<String, Column> columnsByName = processColumnsForTableOrView(table);
    if (table instanceof Table) {
        MutableList<Column> primaryKey = (MutableList<Column>) ((Table) table)._primaryKey().toList();
        for (int i = 0; i < primaryKey.size(); i++) {
            CoreInstance key = primaryKey.get(i);
            if (processorSupport.instance_instanceOf(key, M3Paths.String)) {
                String columnName = key.getName();
                Column column = columnsByName.get(columnName);
                if (column == null) {
                    throw new PureCompilationException(table.getSourceInformation(), "Could not find column " + columnName + " in table " + ((NamedRelation) table)._name());
                }
                primaryKey.set(i, column);
            }
        }
        ((Table) table)._primaryKey(primaryKey);
    }
    if (table instanceof Relation) {
        Relation relation = (Relation) table;
        relation._setColumnsCoreInstance(relation._columns().collect(relationalOperationElement -> (Column) relationalOperationElement));
    }
    processTableMilestoning(table, columnsByName, matcher, processorState, processorSupport);
}
Also used : Maps(org.eclipse.collections.impl.factory.Maps) Join(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.join.Join) BusinessMilestoning(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.BusinessMilestoning) Predicate2(org.eclipse.collections.api.block.predicate.Predicate2) MutableList(org.eclipse.collections.api.list.MutableList) ProcessorState(org.finos.legend.pure.m3.compiler.postprocessing.ProcessorState) ProcessorSupport(org.finos.legend.pure.m3.navigation.ProcessorSupport) 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) RichIterable(org.eclipse.collections.api.RichIterable) Relation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Relation) PostProcessor(org.finos.legend.pure.m3.compiler.postprocessing.PostProcessor) PureCompilationException(org.finos.legend.pure.m4.exception.PureCompilationException) UnifiedMap(org.eclipse.collections.impl.map.mutable.UnifiedMap) Schema(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Schema) ModelRepository(org.finos.legend.pure.m4.ModelRepository) Class(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Class) Iterate(org.eclipse.collections.impl.utility.Iterate) Matcher(org.finos.legend.pure.m3.tools.matcher.Matcher) Milestoning(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Milestoning) NamedRelationAccessor(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.NamedRelationAccessor) UnaryOperation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.operation.UnaryOperation) GenericType(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.GenericType) Lists(org.eclipse.collections.impl.factory.Lists) ImportStub(org.finos.legend.pure.m3.navigation.importstub.ImportStub) TableAliasColumn(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAliasColumn) ListIterable(org.eclipse.collections.api.list.ListIterable) Processor(org.finos.legend.pure.m3.compiler.postprocessing.processor.Processor) Queue(java.util.Queue) ReferenceUsage(org.finos.legend.pure.m3.compiler.ReferenceUsage) ProcessingMilestoning(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.ProcessingMilestoning) Function(org.eclipse.collections.api.block.function.Function) BinaryOperation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.operation.BinaryOperation) Database(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Database) FastList(org.eclipse.collections.impl.list.mutable.FastList) M3Paths(org.finos.legend.pure.m3.navigation.M3Paths) Context(org.finos.legend.pure.m3.compiler.Context) IndexSpecification(org.finos.legend.pure.m4.coreinstance.indexing.IndexSpecification) MutableMap(org.eclipse.collections.api.map.MutableMap) Column(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Column) BusinessSnapshotMilestoning(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.BusinessSnapshotMilestoning) M2RelationalProperties(org.finos.legend.pure.m2.relational.M2RelationalProperties) Date(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.datatype.Date) DynaFunction(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.DynaFunction) Predicates2(org.eclipse.collections.impl.block.factory.Predicates2) PackageableElement(org.finos.legend.pure.m3.navigation.PackageableElement.PackageableElement) M2RelationalPaths(org.finos.legend.pure.m2.relational.M2RelationalPaths) SourceInformation(org.finos.legend.pure.m4.coreinstance.SourceInformation) CoreInstance(org.finos.legend.pure.m4.coreinstance.CoreInstance) IndexSpecifications(org.finos.legend.pure.m4.coreinstance.indexing.IndexSpecifications) Functions0(org.eclipse.collections.impl.block.factory.Functions0) LazyIterate(org.eclipse.collections.impl.utility.LazyIterate) RelationalOperationElement(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.RelationalOperationElement) Table(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Table) Sets(org.eclipse.collections.impl.factory.Sets) MapIterable(org.eclipse.collections.api.map.MapIterable) TableAlias(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAlias) NamedRelation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.NamedRelation) Operation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.operation.Operation) M3Properties(org.finos.legend.pure.m3.navigation.M3Properties) ArrayDeque(java.util.ArrayDeque) Relation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Relation) NamedRelation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.NamedRelation) Table(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Table) MutableList(org.eclipse.collections.api.list.MutableList) TableAliasColumn(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAliasColumn) Column(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Column) CoreInstance(org.finos.legend.pure.m4.coreinstance.CoreInstance) NamedRelation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.NamedRelation) PureCompilationException(org.finos.legend.pure.m4.exception.PureCompilationException)

Example 2 with Relation

use of org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Relation in project legend-pure by finos.

the class DatabaseProcessor method processJoin.

private static void processJoin(Join join, Database defaultDb, ModelRepository repository, ProcessorSupport processorSupport) {
    MutableMap<String, MutableMap<String, CoreInstance>> tableByAliasBySchema = Maps.mutable.empty();
    Operation operation = join._operation();
    MutableList<TableAliasColumn> selfJoinTargets = Lists.mutable.empty();
    scanOperation(operation, tableByAliasBySchema, selfJoinTargets, defaultDb, repository, processorSupport, true);
    Class<?> tableAliasClass = (Class<?>) processorSupport.package_getByUserPath(M2RelationalPaths.TableAlias);
    MutableList<TableAlias> tableAliases = Lists.mutable.empty();
    for (MutableMap<String, CoreInstance> schemaTableByAlias : tableByAliasBySchema) {
        schemaTableByAlias.forEachKeyValue((alias, table) -> {
            TableAlias tableAlias = (TableAlias) repository.newAnonymousCoreInstance(join.getSourceInformation(), tableAliasClass);
            tableAlias._name(repository.newStringCoreInstance_cached(alias).getName());
            tableAlias._relationalElement((RelationalOperationElement) table);
            tableAliases.add(tableAlias);
        });
    }
    if (tableAliases.size() > 2) {
        throw new PureCompilationException(join.getSourceInformation(), "A join can only contain 2 tables. Please use Join chains (using '>') in your mapping in order to compose many of them.");
    }
    if (tableAliases.size() == 1) {
        // Self Join
        if (selfJoinTargets.isEmpty()) {
            throw new PureCompilationException(join.getSourceInformation(), "The system can only find one table in the join. Please use the '{target}' notation in order to define a directed self join.");
        }
        TableAlias existingAlias = tableAliases.get(0);
        String existingAliasName = existingAlias._name();
        RelationalOperationElement existingRelationalElement = existingAlias._relationalElement();
        TableAlias tableAlias = (TableAlias) repository.newAnonymousCoreInstance(existingAlias.getSourceInformation(), tableAliasClass);
        tableAlias._name(repository.newStringCoreInstance_cached("t_" + existingAliasName).getName());
        tableAlias._relationalElement(existingRelationalElement);
        tableAliases.add(tableAlias);
        join._target(tableAlias);
        for (TableAliasColumn selfJoinTarget : selfJoinTargets) {
            selfJoinTarget._alias(tableAlias);
            String columnName = selfJoinTarget._columnName();
            Column col = null;
            if (existingRelationalElement instanceof Relation) {
                col = (Column) ((Relation) existingRelationalElement)._columns().selectWith(COLUMN_NAME_PREDICATE, columnName).toList().getFirst();
            }
            if (col == null) {
                throw new PureCompilationException(selfJoinTarget.getSourceInformation(), "The column '" + columnName + "' can't be found in the table '" + ((NamedRelation) existingRelationalElement)._name() + "'");
            }
            selfJoinTarget._column(col);
        }
    } else if (selfJoinTargets.notEmpty()) {
        throw new PureCompilationException(join.getSourceInformation(), "A self join can only contain 1 table, found " + selfJoinTargets.size());
    }
    // All Joins
    Pair<TableAlias, TableAlias> pair1 = newPair(tableAliasClass, tableAliasClass, repository, processorSupport);
    pair1._first(tableAliases.get(0));
    pair1._second(tableAliases.get(1));
    Pair<TableAlias, TableAlias> pair2 = newPair(tableAliasClass, tableAliasClass, repository, processorSupport);
    pair2._first(tableAliases.get(1));
    pair2._second(tableAliases.get(0));
    join._aliases(Lists.immutable.with(pair1, pair2));
}
Also used : RelationalOperationElement(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.RelationalOperationElement) MutableMap(org.eclipse.collections.api.map.MutableMap) UnaryOperation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.operation.UnaryOperation) BinaryOperation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.operation.BinaryOperation) Operation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.operation.Operation) Relation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Relation) NamedRelation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.NamedRelation) TableAliasColumn(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAliasColumn) Column(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Column) CoreInstance(org.finos.legend.pure.m4.coreinstance.CoreInstance) TableAlias(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAlias) Class(org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.Class) TableAliasColumn(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAliasColumn) PureCompilationException(org.finos.legend.pure.m4.exception.PureCompilationException)

Example 3 with Relation

use of org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Relation in project legend-pure by finos.

the class DatabaseProcessor method processColumnsForTableOrView.

public static MapIterable<String, Column> processColumnsForTableOrView(CoreInstance tableOrView) {
    ListIterable<? extends RelationalOperationElement> columns = FastList.newList();
    if (tableOrView instanceof Relation) {
        columns = ((Relation) tableOrView)._columns().toList();
    }
    MutableMap<String, Column> columnsByName = UnifiedMap.newMap(columns.size());
    for (RelationalOperationElement column : columns) {
        if (!(column instanceof Column)) {
            throw new PureCompilationException(column.getSourceInformation(), "Expected an instance of " + M2RelationalPaths.Column + ", found " + PackageableElement.getUserPathForPackageableElement(column.getClassifier()));
        }
        String columnName = ((Column) column)._name();
        RelationalOperationElement old = columnsByName.put(columnName, (Column) column);
        if (old != null) {
            throw new PureCompilationException(column.getSourceInformation(), "Multiple columns named '" + columnName + "' found in " + tableOrView.getClassifier().getName().toLowerCase() + " " + ((NamedRelation) tableOrView)._name());
        }
        ((Column) column)._owner((Relation) tableOrView);
    }
    return columnsByName;
}
Also used : Relation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Relation) NamedRelation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.NamedRelation) TableAliasColumn(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAliasColumn) Column(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Column) RelationalOperationElement(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.RelationalOperationElement) NamedRelation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.NamedRelation) PureCompilationException(org.finos.legend.pure.m4.exception.PureCompilationException)

Example 4 with Relation

use of org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Relation in project legend-engine by finos.

the class HelperRelationalBuilder method processRelationalPrimaryKey.

public static void processRelationalPrimaryKey(RootRelationalInstanceSetImplementation rootRelationalInstanceSetImplementation) {
    if (rootRelationalInstanceSetImplementation._groupBy() != null) {
        rootRelationalInstanceSetImplementation._primaryKey(rootRelationalInstanceSetImplementation._groupBy()._columns());
    } else // TODO handle distinct
    if (rootRelationalInstanceSetImplementation._primaryKey().isEmpty()) {
        Relation relation = (Relation) rootRelationalInstanceSetImplementation._mainTableAlias()._relationalElement();
        final TableAlias finalMainTable = rootRelationalInstanceSetImplementation._mainTableAlias();
        RichIterable<? extends Column> columns = FastList.newList();
        if (relation instanceof Table) {
            columns = ((Table) relation)._primaryKey();
        } else if (relation instanceof View) {
            columns = ((View) relation)._primaryKey();
        }
        RichIterable<TableAliasColumn> primaryKey = columns.collect(new Function<Column, TableAliasColumn>() {

            @Override
            public TableAliasColumn valueOf(Column column) {
                TableAliasColumn tableAliasColumn = new Root_meta_relational_metamodel_TableAliasColumn_Impl("");
                tableAliasColumn._column(column);
                tableAliasColumn._alias(finalMainTable);
                return tableAliasColumn;
            }
        });
        rootRelationalInstanceSetImplementation._primaryKey(primaryKey);
    }
}
Also used : RichIterable(org.eclipse.collections.api.RichIterable) Function(org.eclipse.collections.api.block.function.Function) DynaFunction(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.DynaFunction) Relation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Relation) NamedRelation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.NamedRelation) Table(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Table) TableAliasColumn(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAliasColumn) Column(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Column) TableAlias(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAlias) Root_meta_relational_metamodel_TableAliasColumn_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_TableAliasColumn_Impl) View(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.View) TableAliasColumn(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAliasColumn)

Example 5 with Relation

use of org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Relation in project legend-engine by finos.

the class HelperRelationalBuilder method processRelationalOperationElement.

public static RelationalOperationElement processRelationalOperationElement(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.operation.RelationalOperationElement operationElement, CompileContext context, MutableMap<String, org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAlias> aliasMap, MutableList<org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAliasColumn> selfJoinTargets) {
    if (operationElement instanceof org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.operation.TableAliasColumn) {
        org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.operation.TableAliasColumn tableAliasColumn = (org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.operation.TableAliasColumn) operationElement;
        // Self join
        if (tableAliasColumn.table.table.equals(SELF_JOIN_TABLE_NAME) && tableAliasColumn.tableAlias.equals(SELF_JOIN_TABLE_NAME)) {
            org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAliasColumn selfJoin = new Root_meta_relational_metamodel_TableAliasColumn_Impl("")._columnName(tableAliasColumn.column);
            selfJoinTargets.add(selfJoin);
            return selfJoin;
        }
        Relation relation = getRelation((Database) context.resolveStore(tableAliasColumn.table.database, tableAliasColumn.table.sourceInformation), tableAliasColumn.table.schema, tableAliasColumn.table.table, tableAliasColumn.table.sourceInformation);
        Column col = getColumn(relation, tableAliasColumn.column, tableAliasColumn.sourceInformation);
        TableAlias alias = aliasMap.getIfAbsentPut(tableAliasColumn.table.schema + "." + tableAliasColumn.tableAlias, (Function0<TableAlias>) () -> new Root_meta_relational_metamodel_TableAlias_Impl("")._name(tableAliasColumn.tableAlias)._relationalElement(col._owner())._database(HelperRelationalBuilder.resolveDatabase(tableAliasColumn.table.getDb(), tableAliasColumn.table.sourceInformation, context)));
        return new Root_meta_relational_metamodel_TableAliasColumn_Impl("")._columnName(col._name())._column(col)._alias(alias);
    } else if (operationElement instanceof ElementWithJoins) {
        ElementWithJoins elementWithJoins = (ElementWithJoins) operationElement;
        RelationalOperationElementWithJoin res = new Root_meta_relational_metamodel_RelationalOperationElementWithJoin_Impl("")._joinTreeNode(buildElementWithJoinsJoinTreeNode(elementWithJoins.joins, context));
        return elementWithJoins.relationalElement == null ? res : res._relationalOperationElement(processRelationalOperationElement(elementWithJoins.relationalElement, context, UnifiedMap.newMap(), selfJoinTargets));
    } else if (operationElement instanceof DynaFunc) {
        DynaFunc dynaFunc = (DynaFunc) operationElement;
        MutableList<RelationalOperationElement> ps = ListIterate.collect(dynaFunc.parameters, relationalOperationElement -> processRelationalOperationElement(relationalOperationElement, context, aliasMap, selfJoinTargets));
        return new Root_meta_relational_metamodel_DynaFunction_Impl("")._name(dynaFunc.funcName)._parameters(ps);
    } else if (operationElement instanceof org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.operation.Literal) {
        org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.operation.Literal literal = (org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.operation.Literal) operationElement;
        return new Root_meta_relational_metamodel_Literal_Impl("")._value(convertLiteral(convertLiteral(literal.value)));
    } else if (operationElement instanceof org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.operation.LiteralList) {
        org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.operation.LiteralList literalList = (org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.operation.LiteralList) operationElement;
        return new Root_meta_relational_metamodel_LiteralList_Impl("")._values(ListIterate.collect(literalList.values, l -> new Root_meta_relational_metamodel_Literal_Impl("")._value(convertLiteral(l.value))));
    }
    throw new UnsupportedOperationException();
}
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) DynaFunc(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.operation.DynaFunc) RelationalOperationElement(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.RelationalOperationElement) RelationalOperationElementWithJoin(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.RelationalOperationElementWithJoin) Relation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Relation) NamedRelation(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.NamedRelation) TableAliasColumn(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAliasColumn) Column(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Column) Literal(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Literal) Root_meta_relational_metamodel_TableAliasColumn_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_TableAliasColumn_Impl) ElementWithJoins(org.finos.legend.engine.protocol.pure.v1.model.packageableElement.store.relational.model.operation.ElementWithJoins) Root_meta_relational_metamodel_LiteralList_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_LiteralList_Impl) Root_meta_relational_metamodel_DynaFunction_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_DynaFunction_Impl) Root_meta_relational_metamodel_Literal_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_Literal_Impl) org.finos.legend.pure.generated.platform_pure_corefunctions_meta(org.finos.legend.pure.generated.platform_pure_corefunctions_meta) TableAliasColumn(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAliasColumn) Root_meta_relational_metamodel_TableAlias_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_TableAlias_Impl) TableAlias(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAlias) Root_meta_relational_metamodel_RelationalOperationElementWithJoin_Impl(org.finos.legend.pure.generated.Root_meta_relational_metamodel_RelationalOperationElementWithJoin_Impl) TableAliasColumn(org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAliasColumn)

Aggregations

NamedRelation (org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.NamedRelation)12 Relation (org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Relation)12 Column (org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.Column)9 TableAlias (org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAlias)9 TableAliasColumn (org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.TableAliasColumn)9 CoreInstance (org.finos.legend.pure.m4.coreinstance.CoreInstance)8 RelationalOperationElement (org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.RelationalOperationElement)7 RichIterable (org.eclipse.collections.api.RichIterable)6 Function (org.eclipse.collections.api.block.function.Function)6 EngineException (org.finos.legend.engine.shared.core.operational.errorManagement.EngineException)6 RootRelationalInstanceSetImplementation (org.finos.legend.pure.m3.coreinstance.meta.relational.mapping.RootRelationalInstanceSetImplementation)5 Operation (org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.operation.Operation)5 Table (org.finos.legend.pure.m3.coreinstance.meta.relational.metamodel.relation.Table)5 PureCompilationException (org.finos.legend.pure.m4.exception.PureCompilationException)5 MutableMap (org.eclipse.collections.api.map.MutableMap)4 GenericType (org.finos.legend.pure.m3.coreinstance.meta.pure.metamodel.type.generics.GenericType)4 List (java.util.List)3 Predicate2 (org.eclipse.collections.api.block.predicate.Predicate2)3 Procedure (org.eclipse.collections.api.block.procedure.Procedure)3 ImmutableList (org.eclipse.collections.api.list.ImmutableList)3