Code review comment: oops. This is a line that was not added intentionally. Have removed it.

Code under review:
public RelRoot rel(String sql, QueryParameters params) {
    RelOptCluster cluster = RelOptCluster.create(planner, new RexBuilder(typeFactory));

    QueryTrait trait = new QueryTrait();

    SqlAnalyzer analyzer =
        SqlAnalyzer.getBuilder()
            .withQueryParams(params)
            .withQueryTrait(trait)
            .withCalciteContext(config.getContext())
            .withTopLevelSchema(defaultSchemaPlus)
            .withTypeFactory((JavaTypeFactory) cluster.getTypeFactory())
            .build();

    AnalyzerOptions options = SqlAnalyzer.initAnalyzerOptions(params);

    
    List<List<String>> tables = analyzer.extractTableNames(sql, options);
    TableResolution.registerTables(this.defaultSchemaPlus, tables);
    SimpleCatalog catalog =
        analyzer.createPopulatedCatalog(defaultSchemaPlus.getName(), options, tables);

    ImmutableMap.Builder<String, ResolvedCreateFunctionStmt> udfBuilder = ImmutableMap.builder();
    ImmutableMap.Builder<List<String>, ResolvedNode> udtvfBuilder = ImmutableMap.builder();

    ResolvedStatement statement;
    ParseResumeLocation parseResumeLocation = new ParseResumeLocation(sql);
    do {
      statement = analyzer.analyzeNextStatement(parseResumeLocation, options, catalog);
      if (statement.nodeKind() == RESOLVED_CREATE_FUNCTION_STMT) {
        ResolvedCreateFunctionStmt createFunctionStmt = (ResolvedCreateFunctionStmt) statement;
        
        String functionFullName =
            String.format(
                "%s:%s",
                SqlAnalyzer.USER_DEFINED_FUNCTIONS,
                String.join(".", createFunctionStmt.getNamePath()));
        udfBuilder.put(functionFullName, createFunctionStmt);
      } else if (statement.nodeKind() == RESOLVED_CREATE_TABLE_FUNCTION_STMT) {
        ResolvedCreateTableFunctionStmt createTableFunctionStmt =
            (ResolvedCreateTableFunctionStmt) statement;
        catalog.addTableValuedFunction(
            new TableValuedFunction.FixedOutputSchemaTVF(
                createTableFunctionStmt.getNamePath(),
                createTableFunctionStmt.getSignature(),
                TVFRelation.createColumnBased(
                    createTableFunctionStmt.getQuery().getColumnList().stream()
                        .map(c -> TVFRelation.Column.create(c.getName(), c.getType()))
                        .collect(Collectors.toList()))));
        udtvfBuilder.put(createTableFunctionStmt.getNamePath(), createTableFunctionStmt.getQuery());
      } else if (statement.nodeKind() == RESOLVED_QUERY_STMT) {
        if (!SqlAnalyzer.isEndOfInput(parseResumeLocation)) {
          throw new UnsupportedOperationException(
              "No additional statements are allowed after a SELECT statement.");
        }
        break;
      }
    } while (!SqlAnalyzer.isEndOfInput(parseResumeLocation));

    if (!(statement instanceof ResolvedQueryStmt)) {
      throw new UnsupportedOperationException(
          "Statement list must end in a SELECT statement, not " + statement.nodeKindString());
    }

    ExpressionConverter expressionConverter =
        new ExpressionConverter(cluster, params, udfBuilder.build());
    ConversionContext context =
        ConversionContext.of(config, expressionConverter, cluster, trait, udtvfBuilder.build());

    RelNode convertedNode =
        QueryStatementConverter.convertRootQuery(context, (ResolvedQueryStmt) statement);
    LOG.info("SQLPlan>\n" + RelOptUtil.toString(convertedNode));
    return RelRoot.of(convertedNode, SqlKind.ALL);
  }

Line commented on: LOG.info("SQLPlan>\n" + RelOptUtil.toString(convertedNode));

Revised code:
public RelRoot rel(String sql, QueryParameters params) {
    RelOptCluster cluster = RelOptCluster.create(planner, new RexBuilder(typeFactory));

    QueryTrait trait = new QueryTrait();

    SqlAnalyzer analyzer =
        SqlAnalyzer.getBuilder()
            .withQueryParams(params)
            .withQueryTrait(trait)
            .withCalciteContext(config.getContext())
            .withTopLevelSchema(defaultSchemaPlus)
            .withTypeFactory((JavaTypeFactory) cluster.getTypeFactory())
            .build();

    AnalyzerOptions options = SqlAnalyzer.initAnalyzerOptions(params);

    
    List<List<String>> tables = analyzer.extractTableNames(sql, options);
    TableResolution.registerTables(this.defaultSchemaPlus, tables);
    SimpleCatalog catalog =
        analyzer.createPopulatedCatalog(defaultSchemaPlus.getName(), options, tables);

    ImmutableMap.Builder<String, ResolvedCreateFunctionStmt> udfBuilder = ImmutableMap.builder();
    ImmutableMap.Builder<List<String>, ResolvedNode> udtvfBuilder = ImmutableMap.builder();

    ResolvedStatement statement;
    ParseResumeLocation parseResumeLocation = new ParseResumeLocation(sql);
    do {
      statement = analyzer.analyzeNextStatement(parseResumeLocation, options, catalog);
      if (statement.nodeKind() == RESOLVED_CREATE_FUNCTION_STMT) {
        ResolvedCreateFunctionStmt createFunctionStmt = (ResolvedCreateFunctionStmt) statement;
        
        String functionFullName =
            String.format(
                "%s:%s",
                SqlAnalyzer.USER_DEFINED_FUNCTIONS,
                String.join(".", createFunctionStmt.getNamePath()));
        udfBuilder.put(functionFullName, createFunctionStmt);
      } else if (statement.nodeKind() == RESOLVED_CREATE_TABLE_FUNCTION_STMT) {
        ResolvedCreateTableFunctionStmt createTableFunctionStmt =
            (ResolvedCreateTableFunctionStmt) statement;
        udtvfBuilder.put(createTableFunctionStmt.getNamePath(), createTableFunctionStmt.getQuery());
      } else if (statement.nodeKind() == RESOLVED_QUERY_STMT) {
        if (!SqlAnalyzer.isEndOfInput(parseResumeLocation)) {
          throw new UnsupportedOperationException(
              "No additional statements are allowed after a SELECT statement.");
        }
        break;
      }
    } while (!SqlAnalyzer.isEndOfInput(parseResumeLocation));

    if (!(statement instanceof ResolvedQueryStmt)) {
      throw new UnsupportedOperationException(
          "Statement list must end in a SELECT statement, not " + statement.nodeKindString());
    }

    ExpressionConverter expressionConverter =
        new ExpressionConverter(cluster, params, udfBuilder.build());
    ConversionContext context =
        ConversionContext.of(config, expressionConverter, cluster, trait, udtvfBuilder.build());

    RelNode convertedNode =
        QueryStatementConverter.convertRootQuery(context, (ResolvedQueryStmt) statement);
    return RelRoot.of(convertedNode, SqlKind.ALL);
  }