sql, stmtName, procName, catalog.getClusters().get("cluster"), db,
partitioning, hsql, estimates, false, DEFAULT_MAX_JOIN_TABLES,
costModel, null, joinOrder, detMode);
try {
planner.parse();
plan = planner.plan();
assert(plan != null);
} catch (PlanningErrorException e) {
// These are normal expectable errors -- don't normally need a stack-trace.
String msg = "Failed to plan for statement (" + catalogStmt.getTypeName() + ") " + catalogStmt.getSqltext();
if (e.getMessage() != null) {