class OptimizeTableAnalyzer {

    private final Schemas schemas;
    private final NodeContext nodeCtx;

    OptimizeTableAnalyzer(Schemas schemas, NodeContext nodeCtx) {
        this.schemas = schemas;
        this.nodeCtx = nodeCtx;
    }

    public AnalyzedOptimizeTable analyze(OptimizeStatement<Expression> statement,
                                         ParamTypeHints paramTypeHints,
                                         CoordinatorTxnCtx txnCtx) {<FILL_FUNCTION_BODY>}
}

        var exprAnalyzerWithFieldsAsString = new ExpressionAnalyzer(
            txnCtx, nodeCtx, paramTypeHints, FieldProvider.TO_LITERAL_VALIDATE_NAME, null);

        var exprCtx = new ExpressionAnalysisContext(txnCtx.sessionSettings());
        OptimizeStatement<Symbol> analyzedStatement =
            statement.map(x -> exprAnalyzerWithFieldsAsString.convert(x, exprCtx));

        HashMap<Table<Symbol>, TableInfo> analyzedOptimizeTables = new HashMap<>();
        for (Table<Symbol> table : analyzedStatement.tables()) {
            TableInfo tableInfo = schemas.findRelation(
                table.getName(),
                Operation.OPTIMIZE,
                txnCtx.sessionSettings().sessionUser(),
                txnCtx.sessionSettings().searchPath()
            );
            analyzedOptimizeTables.put(table, tableInfo);
        }
        return new AnalyzedOptimizeTable(analyzedOptimizeTables, analyzedStatement.properties());
    
<no_super_class>