Class PgCreateStatistics


public final class PgCreateStatistics extends PgParserAbstract
Parser for PostgreSQL CREATE STATISTICS statements.

This class handles parsing of extended statistics definitions including statistics kinds (ndistinct, dependencies, mcv), target table references, and column expressions. Extended statistics provide improved query planning by collecting multi-column statistics.

  • Constructor Details

    • PgCreateStatistics

      public PgCreateStatistics(SQLParser.Create_statistics_statementContext ctx, PgDatabase db, org.antlr.v4.runtime.CommonTokenStream stream, ISettings settings)
      Constructs a new CreateStatistics parser.
      Parameters:
      ctx - the CREATE STATISTICS statement context
      db - the PostgreSQL database object
      stream - the token stream for parsing expressions
      settings - the ISettings object
  • Method Details

    • parseObject

      public void parseObject()
      Description copied from class: ParserAbstract
      Parses a database object from the current context. Must be implemented by concrete subclasses to handle specific object types.
      Specified by:
      parseObject in class ParserAbstract<PgDatabase>
    • parseStatistics

      public void parseStatistics(PgStatistics stat)
      Parses statistics configuration from the statement context.
      Parameters:
      stat - the statistics object to populate with parsed data