@Override public Pair<int[], int[]> getInputOutputDependencyLabels(ILogicalOperator op) { int[] inputDependencyLabels = new int[] { 0 }; AbstractReplicateOperator rop = (AbstractReplicateOperator) op; int[] outputDependencyLabels = new int[rop.getOutputArity()]; // change the labels of outputs that requires materialization to 1 boolean[] outputMaterializationFlags = rop.getOutputMaterializationFlags(); for (int i = 0; i < rop.getOutputArity(); i++) { if (outputMaterializationFlags[i]) { outputDependencyLabels[i] = 1; } } return new Pair<>(inputDependencyLabels, outputDependencyLabels); }
/** * Updates the outputs references of a replicate operator to points to the valid parents. * @param replicateToOutputs where the replicate operators are stored with its valid parents. * @param newOutputs the valid parents of replicate operator. */ private void cleanup(Map<Mutable<ILogicalOperator>, BitSet> replicateToOutputs, List<Pair<Mutable<ILogicalOperator>, Boolean>> newOutputs) { replicateToOutputs.forEach((repRef, allOutputs) -> { newOutputs.clear(); // get the indexes that are set in the BitSet allOutputs.stream().forEach(outIndex -> { newOutputs.add(new Pair<>(((AbstractReplicateOperator) repRef.getValue()).getOutputs().get(outIndex), ((AbstractReplicateOperator) repRef.getValue()).getOutputMaterializationFlags()[outIndex])); }); ((AbstractReplicateOperator) repRef.getValue()).setOutputs(newOutputs); }); }
DotFormatBuilder.StringValue.of(Integer.toString(replicateOutput.hashCode())), destinationNodeLabel); if (replicateOperator.getOutputMaterializationFlags()[i]) { dotBuilder.createEdge(sourceNode, destinationNode).setColor(DotFormatBuilder.Color.RED); } else {