public ExchangeBuilder singleDistributionPartitioningScheme(Symbol... outputSymbols) { return singleDistributionPartitioningScheme(Arrays.asList(outputSymbols)); }
public TableFinishNode tableDelete(SchemaTableName schemaTableName, PlanNode deleteSource, Symbol deleteRowId) { TableWriterNode.DeleteHandle deleteHandle = new TableWriterNode.DeleteHandle( new TableHandle( new ConnectorId("testConnector"), new TestingTableHandle()), schemaTableName); return new TableFinishNode( idAllocator.getNextId(), exchange(e -> e .addSource(new DeleteNode( idAllocator.getNextId(), deleteSource, deleteHandle, deleteRowId, ImmutableList.of(deleteRowId))) .addInputsSet(deleteRowId) .singleDistributionPartitioningScheme(deleteRowId)), deleteHandle, deleteRowId, Optional.empty(), Optional.empty()); }
p.values(a, b, h, sortSymbol)) .addInputsSet(a, b, h, sortSymbol) .singleDistributionPartitioningScheme( ImmutableList.of(a, b, h, sortSymbol)) .orderingScheme(orderingScheme)));
.addInputsSet(a) .addInputsSet(b) .singleDistributionPartitioningScheme(c))); }) .matches(
@Test public void testDoesNotFireNarrowingProjection() { tester().assertThat(new PushProjectionThroughExchange()) .on(p -> { Symbol a = p.symbol("a"); Symbol b = p.symbol("b"); Symbol c = p.symbol("c"); return p.project( Assignments.builder() .put(a, a.toSymbolReference()) .put(b, b.toSymbolReference()) .build(), p.exchange(e -> e .addSource(p.values(a, b, c)) .addInputsSet(a, b, c) .singleDistributionPartitioningScheme(a, b, c))); }) .doesNotFire(); }
public ExchangeNode gatheringExchange(ExchangeNode.Scope scope, PlanNode child) { return exchange(builder -> builder.type(ExchangeNode.Type.GATHER) .scope(scope) .singleDistributionPartitioningScheme(child.getOutputSymbols()) .addSource(child) .addInputsSet(child.getOutputSymbols())); }