Java源码示例:org.apache.calcite.rel.BiRel
示例1
private static void populateSystemStreams(RelNode relNode, List<String> inputSystemStreams,
List<String> outputSystemStreams) {
if (relNode instanceof TableModify) {
outputSystemStreams.add(getSystemStreamName(relNode));
} else {
if (relNode instanceof BiRel) {
BiRel biRelNode = (BiRel) relNode;
populateSystemStreams(biRelNode.getLeft(), inputSystemStreams, outputSystemStreams);
populateSystemStreams(biRelNode.getRight(), inputSystemStreams, outputSystemStreams);
} else {
if (relNode.getTable() != null) {
inputSystemStreams.add(getSystemStreamName(relNode));
}
}
}
List<RelNode> relNodes = relNode.getInputs();
if (relNodes == null || relNodes.isEmpty()) {
return;
}
relNodes.forEach(node -> populateSystemStreams(node, inputSystemStreams, outputSystemStreams));
}
示例2
private RelNode visitJoin(BiRel join) {
final int x = offset.get();
visitChild(join, 0, join.getLeft());
offset.set(x + join.getLeft().getRowType().getFieldCount());
visitChild(join, 1, join.getRight());
offset.set(x);
return join;
}
示例3
private RelNode visitJoin(BiRel join) {
final int x = offset.get();
visitChild(join, 0, join.getLeft());
offset.set(x + join.getLeft().getRowType().getFieldCount());
visitChild(join, 1, join.getRight());
offset.set(x);
return join;
}
示例4
private RelNode visitJoin(BiRel join) {
final int x = offset.get();
visitChild(join, 0, join.getLeft());
offset.set(x + join.getLeft().getRowType().getFieldCount());
visitChild(join, 1, join.getRight());
offset.set(x);
return join;
}
示例5
private RelNode visitJoin(BiRel join) {
final int x = offset.get();
visitChild(join, 0, join.getLeft());
offset.set(x + join.getLeft().getRowType().getFieldCount());
visitChild(join, 1, join.getRight());
offset.set(x);
return join;
}
示例6
public RelDistribution distribution(BiRel rel, RelMetadataQuery mq) {
return mq.distribution(rel.getLeft());
}
示例7
public void fixSharedOlapTableScanOnTheLeft(BiRel parent) {
OLAPTableScan copy = copyTableScanIfNeeded(parent.getLeft());
if (copy != null)
parent.replaceInput(0, copy);
}
示例8
public void fixSharedOlapTableScanOnTheRight(BiRel parent) {
OLAPTableScan copy = copyTableScanIfNeeded(parent.getRight());
if (copy != null)
parent.replaceInput(1, copy);
}
示例9
public void fixSharedOlapTableScanOnTheLeft(BiRel parent) {
OLAPTableScan copy = copyTableScanIfNeeded(parent.getLeft());
if (copy != null)
parent.replaceInput(0, copy);
}
示例10
public void fixSharedOlapTableScanOnTheRight(BiRel parent) {
OLAPTableScan copy = copyTableScanIfNeeded(parent.getRight());
if (copy != null)
parent.replaceInput(1, copy);
}
示例11
public RelDistribution distribution(BiRel rel, RelMetadataQuery mq) {
return mq.distribution(rel.getLeft());
}