Skip to content

Commit d80735e

Browse files
committed
refactor: delete unused code
1 parent 78988b2 commit d80735e

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

isthmus/src/main/java/io/substrait/isthmus/SubstraitToCalcite.java

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,10 @@
33
import io.substrait.extension.SimpleExtension;
44
import io.substrait.isthmus.SubstraitRelNodeConverter.Context;
55
import io.substrait.plan.Plan;
6-
import io.substrait.relation.NamedScan;
76
import io.substrait.relation.Rel;
8-
import io.substrait.relation.RelCopyOnWriteVisitor;
9-
import io.substrait.type.NamedStruct;
107
import io.substrait.util.EmptyVisitationContext;
118
import java.util.ArrayList;
12-
import java.util.HashMap;
139
import java.util.List;
14-
import java.util.Map;
15-
import java.util.Optional;
1610
import org.apache.calcite.jdbc.CalciteSchema;
1711
import org.apache.calcite.prepare.Prepare;
1812
import org.apache.calcite.rel.RelNode;
@@ -229,29 +223,4 @@ private Pair<Integer, RelDataType> renameFields(
229223
return Pair.of(currentIndex, type);
230224
}
231225
}
232-
233-
private static class NamedStructGatherer extends RelCopyOnWriteVisitor<RuntimeException> {
234-
Map<List<String>, NamedStruct> tableMap;
235-
236-
private NamedStructGatherer() {
237-
super();
238-
this.tableMap = new HashMap<>();
239-
}
240-
241-
public static Map<List<String>, NamedStruct> gatherTables(Rel rel) {
242-
NamedStructGatherer visitor = new NamedStructGatherer();
243-
rel.accept(visitor, EmptyVisitationContext.INSTANCE);
244-
return visitor.tableMap;
245-
}
246-
247-
@Override
248-
public Optional<Rel> visit(NamedScan namedScan, EmptyVisitationContext context) {
249-
Optional<Rel> result = super.visit(namedScan, context);
250-
251-
List<String> tableName = namedScan.getNames();
252-
tableMap.put(tableName, namedScan.getInitialSchema());
253-
254-
return result;
255-
}
256-
}
257226
}

0 commit comments

Comments
 (0)