@Test public void join() { DmdlSemantics resolved = resolve(); ModelDeclaration simple = resolved.findModelDeclaration("simple"); assertThat(simple, not(nullValue())); PropertyDeclaration sid = simple.findPropertyDeclaration("sid"); assertThat(sid, not(nullValue())); assertThat(sid.getType(), is(type(BasicTypeKind.LONG))); PropertyDeclaration aValue = simple.findPropertyDeclaration("a_value"); assertThat(aValue, not(nullValue())); assertThat(aValue.getType(), is(type(BasicTypeKind.TEXT))); PropertyDeclaration bValue = simple.findPropertyDeclaration("b_value"); assertThat(bValue, not(nullValue())); assertThat(bValue.getType(), is(type(BasicTypeKind.DATE))); JoinTrait trait = simple.getTrait(JoinTrait.class); assertThat(trait, not(nullValue())); assertThat(trait.getTerms().size(), is(2)); ReduceTerm<AstJoin> aTerm = trait.getTerms().get(0); assertThat(aTerm.getSource(), is(model("a"))); assertThat(aTerm.getGrouping(), has(property("sid"))); assertThat(aTerm.getMappings(), has(mapping(PropertyMappingKind.ANY, "sid", "sid"))); assertThat(aTerm.getMappings(), has(mapping(PropertyMappingKind.ANY, "value", "a_value"))); ReduceTerm<AstJoin> bTerm = trait.getTerms().get(1); assertThat(bTerm.getSource(), is(model("b"))); assertThat(bTerm.getGrouping(), has(property("sid"))); assertThat(bTerm.getMappings(), has(mapping(PropertyMappingKind.ANY, "sid", "sid"))); assertThat(bTerm.getMappings(), has(mapping(PropertyMappingKind.ANY, "value", "b_value"))); }
public synchronized DmdlSemantics resolve() throws DmdlSemanticException { checkDiagnostics(); resolveSymbols(); checkDiagnostics(); resolveAttributes(); checkDiagnostics(); verifyAttributes(); checkDiagnostics(); return context.getWorld(); }
DmdlAnalyzer { public synchronized DmdlSemantics resolve() throws DmdlSemanticException { checkDiagnostics(); resolveSymbols(); checkDiagnostics(); resolveAttributes(); checkDiagnostics(); verifyAttributes(); checkDiagnostics(); return context.getWorld(); } }
DmdlAnalyzer { public synchronized DmdlSemantics resolve() throws DmdlSemanticException { checkDiagnostics(); resolveSymbols(); checkDiagnostics(); resolveAttributes(); checkDiagnostics(); verifyAttributes(); checkDiagnostics(); return context.getWorld(); } DmdlAnalyzer(
            Iterable<? extends TypeDriver> typeDrivers,
            Iterable<? extends AttributeDriver> attributeDrivers);  DmdlAnalyzer(
            DmdlAnalyzerEnhancer enhancer,
            Iterable<? extends TypeDriver> typeDrivers,
            Iterable<? extends AttributeDriver> attributeDrivers); }
DmdlAnalyzer { public synchronized DmdlSemantics resolve() throws DmdlSemanticException { checkDiagnostics(); resolveSymbols(); checkDiagnostics(); resolveAttributes(); checkDiagnostics(); verifyAttributes(); checkDiagnostics(); return context.getWorld(); } DmdlAnalyzer(
            Iterable<? extends TypeDriver> typeDrivers,
            Iterable<? extends AttributeDriver> attributeDrivers);  DmdlAnalyzer(
            DmdlAnalyzerEnhancer enhancer,
            Iterable<? extends TypeDriver> typeDrivers,
            Iterable<? extends AttributeDriver> attributeDrivers); void addModel(AstModelDefinition<?> definition); synchronized DmdlSemantics resolve(); }
DmdlAnalyzer { public synchronized DmdlSemantics resolve() throws DmdlSemanticException { checkDiagnostics(); resolveSymbols(); checkDiagnostics(); resolveAttributes(); checkDiagnostics(); verifyAttributes(); checkDiagnostics(); return context.getWorld(); } DmdlAnalyzer(
            Iterable<? extends TypeDriver> typeDrivers,
            Iterable<? extends AttributeDriver> attributeDrivers);  DmdlAnalyzer(
            DmdlAnalyzerEnhancer enhancer,
            Iterable<? extends TypeDriver> typeDrivers,
            Iterable<? extends AttributeDriver> attributeDrivers); void addModel(AstModelDefinition<?> definition); synchronized DmdlSemantics resolve();  }