List<OptiqSchema.LatticeEntry> lattices) {
queryString = sqlQuery.toString();
init(runtimeContextClass);
SqlToRelConverter sqlToRelConverter =
getSqlToRelConverter(validator, catalogReader);
SqlExplain sqlExplain = null;
if (sqlQuery.getKind() == SqlKind.EXPLAIN) {
// dig out the underlying SQL statement
sqlExplain = (SqlExplain) sqlQuery;
sqlQuery = sqlExplain.getExplicandum();
sqlToRelConverter.setIsExplain(sqlExplain.getDynamicParamCount());
}
RelNode rootRel =
sqlToRelConverter.convertQuery(sqlQuery, needsValidation, true);
Hook.CONVERTED.run(rootRel);
if (timingTracer != null) {
timingTracer.traceTime("end sql2rel");
}