Examples of projections()


Examples of de.fuberlin.wiwiss.d2rq.algebra.Relation.projections()

  public void testAskMatch() {
    NodeRelation nodeRel = translate1("ex:res1 rdf:type ex:Class1", "engine/type-bridge.n3");
    Relation r = nodeRel.baseRelation();
    assertEquals(Collections.singleton(table1), r.tables());
    assertEquals(Collections.EMPTY_SET, r.projections());
    assertEquals(Equality.createAttributeValue(table1id, "1"), r.condition());
    assertEquals(AliasMap.NO_ALIASES, r.aliases());
    assertEquals(Collections.EMPTY_SET, nodeRel.variables());
  }
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.algebra.Relation.projections()

 
  public void testFindFixedMatch() {
    NodeRelation nodeRel = translate1("ex:res1 rdf:type ?type", "engine/type-bridge.n3");
    Relation r = nodeRel.baseRelation();
    assertEquals(Collections.singleton(table1), r.tables());
    assertEquals(Collections.EMPTY_SET, r.projections());
    assertEquals(Equality.createAttributeValue(table1id, "1"), r.condition());
    assertEquals(AliasMap.NO_ALIASES, r.aliases());
    assertEquals(Collections.singleton(type), nodeRel.variables());
    assertEquals("Fixed(<http://example.org/Class1>)",
        nodeRel.nodeMaker(type).toString());
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.algebra.Relation.projections()

 
  public void testFindMatch() {
    NodeRelation nodeRel = translate1("?x rdf:type ex:Class1", "engine/type-bridge.n3");
    Relation r = nodeRel.baseRelation();
    assertEquals(Collections.singleton(table1), r.tables());
    assertEquals(Collections.singleton(table1id), r.projections());
    assertEquals(Expression.TRUE, r.condition());
    assertEquals(AliasMap.NO_ALIASES, r.aliases());
    assertEquals(Collections.singleton(x), nodeRel.variables());
    assertEquals("URI(Pattern(http://example.org/res@@table1.id@@))",
        nodeRel.nodeMaker(x).toString());
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.algebra.Relation.projections()

  public void testMatchOneOfTwoPropertyBridges() {
    NodeRelation nodeRel = translate1(
        "ex:res1 rdf:type ex:Class1",
        "engine/simple.n3");
    Relation r = nodeRel.baseRelation();
    assertEquals(Collections.EMPTY_SET, r.projections());
    assertEquals(Equality.createAttributeValue(table1id, "1"), r.condition());
  }
 
  public void testAskTwoTriplePatternsNoMatch() {
    assertNull(translate1(
View Full Code Here

Examples of io.crate.planner.node.dql.CollectNode.projections()

        AggregationProjection aggregationProjection = new AggregationProjection();
        aggregationProjection.aggregations(Arrays.asList( // not a real use case, only for test convenience, sorry
                new Aggregation(maxInfo, Arrays.<Symbol>asList(new InputColumn(0)), Aggregation.Step.ITER, Aggregation.Step.FINAL),
                new Aggregation(maxInfo, Arrays.<Symbol>asList(new InputColumn(1)), Aggregation.Step.ITER, Aggregation.Step.PARTIAL)
        ));
        collectNode.projections(Arrays.<Projection>asList(aggregationProjection));
        PlanNodeStreamerVisitor.Context ctx = visitor.process(collectNode);
        Streamer<?>[] streamers = ctx.outputStreamers();
        assertThat(streamers.length, is(4));
        assertThat(streamers[0], instanceOf(DataTypes.BOOLEAN.streamer().getClass()));
        assertThat(streamers[1], instanceOf(DataTypes.INTEGER.streamer().getClass()));
View Full Code Here

Examples of io.crate.planner.node.dql.CollectNode.projections()

        CollectNode node = new CollectNode("distributing collect", analysis.table().getRouting(analysis.whereClause()));
        node.whereClause(analysis.whereClause());
        node.maxRowGranularity(analysis.rowGranularity());
        node.downStreamNodes(downstreamNodes);
        node.toCollect(toCollect);
        node.projections(projections);

        node.isPartitioned(analysis.table().isPartitioned());
        setOutputTypes(node);
        return node;
    }
View Full Code Here

Examples of io.crate.planner.node.dql.CollectNode.projections()

        }
        CollectNode node = new CollectNode("collect", routing);
        node.whereClause(analysis.whereClause());
        node.toCollect(toCollect);
        node.maxRowGranularity(analysis.rowGranularity());
        node.projections(projections);
        node.isPartitioned(analysis.table().isPartitioned());
        setOutputTypes(node);
        return node;
    }
View Full Code Here

Examples of io.crate.planner.node.dql.MergeNode.projections()

                    new boolean[]{true, true},
                    new Boolean[] { null, null });
            topNProjection.outputs(Arrays.<Symbol>asList(new InputColumn(0), new InputColumn(1)));

            MergeNode mergeNode = new MergeNode("merge", 2);
            mergeNode.projections(Arrays.<Projection>asList(
                    groupProjection,
                    topNProjection
            ));
            List<ListenableFuture<TaskResult>> upstreamResults = new ArrayList<>(1);
            for (int i=1; i<14; i++) {
View Full Code Here

Examples of io.crate.planner.node.dql.MergeNode.projections()

        dummyMergeNode.inputTypes(Arrays.<DataType>asList(DataTypes.INTEGER, DataTypes.STRING));
        TopNProjection topNProjection = new TopNProjection(10, 0);
        topNProjection.outputs(Arrays.<Symbol>asList(
                new InputColumn(0, DataTypes.INTEGER),
                new InputColumn(1, DataTypes.INTEGER)));
        dummyMergeNode.projections(Arrays.<Projection>asList(topNProjection));

        DistributedRequestContextManager contextManager =
                new DistributedRequestContextManager(new DummyDownstreamOperationFactory(rows), functions,
                        new StatsTables(ImmutableSettings.EMPTY, mock(NodeSettingsService.class)));
View Full Code Here

Examples of io.crate.planner.node.dql.MergeNode.projections()

        ));
        TopNProjection topNProjection = new TopNProjection(
                10, 0, Arrays.<Symbol>asList(new InputColumn(1)), new boolean[] { false }, new Boolean[] { null });
        topNProjection.outputs(Arrays.<Symbol>asList(new InputColumn(0), new InputColumn(1)));

        mergeNode.projections(Arrays.asList(groupProjection, topNProjection));
        mergeNode.outputTypes(Arrays.<DataType>asList(DataTypes.STRING, DataTypes.LONG));

        Streamer<?>[] mapperOutputStreamer = new Streamer[] {
                new AggregationStateStreamer(countAggregation),
                DataTypes.STRING.streamer()
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.