Class MaterializedCollectResultBase

    • Field Detail

      • MATERIALIZED_TABLE_MAX_INITIAL_CAPACITY

        public static final int MATERIALIZED_TABLE_MAX_INITIAL_CAPACITY
        Maximum initial capacity of the materialized table.
        See Also:
        Constant Field Values
      • MATERIALIZED_TABLE_MAX_OVERCOMMIT

        public static final int MATERIALIZED_TABLE_MAX_OVERCOMMIT
        Maximum overcommitment of the materialized table.
        See Also:
        Constant Field Values
      • MATERIALIZED_TABLE_CAPACITY_FACTOR

        public static final double MATERIALIZED_TABLE_CAPACITY_FACTOR
        Factor for the initial capacity of the materialized table.
        See Also:
        Constant Field Values
      • MATERIALIZED_TABLE_OVERCOMMIT_FACTOR

        public static final double MATERIALIZED_TABLE_OVERCOMMIT_FACTOR
        Factor for cleaning up deleted rows in the materialized table.
        See Also:
        Constant Field Values
      • maxRowCount

        protected final int maxRowCount
        Maximum number of materialized rows to be stored. After the count is reached, oldest rows are dropped.
      • overcommitThreshold

        protected final int overcommitThreshold
        Threshold for cleaning up deleted rows in the materialized table.
      • materializedTable

        protected final List<RowData> materializedTable
        Materialized table that is continuously updated by inserts and deletes. Deletes at the beginning are lazily cleaned up when the threshold is reached.
      • validRowPosition

        protected int validRowPosition
        Counter for deleted rows to be deleted at the beginning of the materialized table.
    • Constructor Detail

      • MaterializedCollectResultBase

        public MaterializedCollectResultBase​(StatementResult tableResult,
                                             int maxRowCount,
                                             int overcommitThreshold)
    • Method Detail

      • computeMaterializedTableCapacity

        protected static int computeMaterializedTableCapacity​(int maxRowCount)
      • computeMaterializedTableOvercommit

        protected static int computeMaterializedTableOvercommit​(int maxRowCount)