public PhysicalPlan getPlan(String sql, Pointer<String> textPlan) throws SqlParseException, ValidationException, RelConversionException, IOException{
SqlNode sqlNode = planner.parse(sql);
AbstractSqlHandler handler;
SqlHandlerConfig config = new SqlHandlerConfig(hepPlanner, planner, context);
// TODO: make this use path scanning or something similar.
switch(sqlNode.getKind()){
case EXPLAIN:
handler = new ExplainHandler(config);