@Override public void visit(RelNode node, int ordinal, RelNode parent) { if (node instanceof DruidRel) { datasourceNames.addAll(((DruidRel) node).getDataSourceNames()); } if (node instanceof Bindables.BindableTableScan) { Bindables.BindableTableScan bts = (Bindables.BindableTableScan) node; RelOptTable table = bts.getTable(); String tableName = table.getQualifiedName().get(0); datasourceNames.add(tableName); } node.childrenAccept(this); } }
@Override public void visit(RelNode node, int ordinal, RelNode parent) { if (node instanceof DruidRel) { datasourceNames.addAll(((DruidRel) node).getDatasourceNames()); } if (node instanceof Bindables.BindableTableScan) { Bindables.BindableTableScan bts = (Bindables.BindableTableScan) node; RelOptTable table = bts.getTable(); String tableName = table.getQualifiedName().get(0); datasourceNames.add(tableName); } node.childrenAccept(this); } }