presto-main/src/main/java/io/prestosql/sql/planner/InputExtractor.java/InputExtractor/extractInputs
class InputExtractor:    public List<Input> extractInputs(PlanNode root)
    {
        Visitor visitor = new Visitor();
        root.accept(visitor, null);

        return ImmutableList.copyOf(visitor.getInputs());
    }