@Override public RelNode visit(RelNode other) { if (other instanceof RelSubset) { return ((RelSubset) other).getBest().accept(this); } else { return super.visit(other); } }
@Override public RelNode visit(RelNode other) { if (!(other instanceof Join)) { return super.visit(other); } Join join = (Join) other; return getNewJoinCondition(builder, join); } });
@Override public RelNode visit(RelNode other) { if(other instanceof StripLeaf) { return belowStrippedNode; } return super.visit(other); }
@Override public RelNode visit(TableScan scan) { RelNode node = super.visit(scan); String logicalOpId = String.format(TranslatorConstants.LOGOPID_TEMPLATE, queryId, "scan", opId++); scanTranslator.translate(scan, queryLogicalId, logicalOpId, translatorContext, systemDescriptors, inputMsgStreams); return node; }
@Override public RelNode visit(RelNode other) { if(other instanceof ExpansionNode) { if(alreadyFound) { return ((ExpansionNode) other).getInput(); } else { alreadyFound = true; } } return super.visit(other); }}); }
@Override public RelNode visit(LogicalUnion union) { checkCorConditionOfSetOpInputs(union); return super.visit(union); }
@Override public RelNode visit(RelNode relNode) { // There should never be a TableModify in the calcite plan. Validate.isTrue(!(relNode instanceof TableModify)); return super.visit(relNode); }
@Override public RelNode visit(LogicalIntersect intersect) { checkCorConditionOfSetOpInputs(intersect); return super.visit(intersect); }
@Override public RelNode visit(LogicalProject project) { RelNode node = super.visit(project); String logicalOpId = String.format(TranslatorConstants.LOGOPID_TEMPLATE, queryId, "project", opId++); new ProjectTranslator(queryId).translate(project, logicalOpId, translatorContext); return node; }
@Override public RelNode visit(RelNode other) { if (other.getInputs().isEmpty()) { // leaf operator return addLimitAsParent(other); } return super.visit(other); } };
@Override public RelNode visit(final LogicalFilter filter) { try { stack.push(filter); filter.getCondition().accept(rexVisitor(filter)); } finally { stack.pop(); } return super.visit(filter); }
@Override public RelNode visit(LogicalProject project) { try { stack.push(project); for (RexNode node : project.getProjects()) { node.accept(rexVisitor(project)); } } finally { stack.pop(); } return super.visit(project); }
@Override public RelNode visit(LogicalValues values) { values.getCluster().setMetadataProvider(metadataProvider); return super.visit(values); }
@Override public RelNode visit(LogicalAggregate aggregate) { RelNode node = super.visit(aggregate); windowId++; new LogicalAggregateTranslator(windowId).translate(aggregate, translatorContext); return node; } });
@Override public RelNode visit(RelNode other) { // RelShuttleImpl doesn't have visit methods for Project and RelSubset. if (other instanceof RelSubset) { return visit((RelSubset) other); } else if (other instanceof Project) { return visit((Project) other); } return super.visit(other); }
@Override public RelNode visit(LogicalJoin join) { RelNode node = super.visit(join); String logicalOpId = String.format(TranslatorConstants.LOGOPID_TEMPLATE, queryId, "join", opId++); new JoinTranslator(logicalOpId, sqlConfig.getMetadataTopicPrefix(), queryId) .translate(join, translatorContext); return node; }
@Override public RelNode visit(LogicalAggregate aggregate) { RelNode node = super.visit(aggregate); String logicalOpId = String.format(TranslatorConstants.LOGOPID_TEMPLATE, queryId, "window", opId++); new LogicalAggregateTranslator(logicalOpId, sqlConfig.getMetadataTopicPrefix()) .translate(aggregate, translatorContext); return node; } });
@Override public RelNode visit(TableScan scan) { final RelOptTable table = scan.getTable(); final TranslatableTable translatableTable = table.unwrap(TranslatableTable.class); if (translatableTable != null) { return translatableTable.toRel(context, table); } return super.visit(scan); } });
@Override public RelNode visit(TableScan scan) { schemas[0] = scan.getTable().getRelOptSchema(); return super.visit(scan); } });