Class ReduceTableWrapper

  • All Implemented Interfaces:
    org.h2.engine.DbObject, org.h2.schema.SchemaObject

    public class ReduceTableWrapper
    extends org.h2.table.Table
    Thread local table wrapper for real reducer table. All reduce queries share the same small set of this fake tables. During reduce query execution every thread installs it's own real reduce tables into thread-local storage.
    • Field Summary

      • Fields inherited from class org.h2.table.Table

        columns, compareMode, isHidden, TYPE_CACHED, TYPE_MEMORY
      • Fields inherited from class org.h2.engine.DbObjectBase

        comment, database, trace
      • Fields inherited from interface org.h2.engine.DbObject

        AGGREGATE, COMMENT, CONSTANT, CONSTRAINT, FUNCTION_ALIAS, INDEX, RIGHT, ROLE, SCHEMA, SEQUENCE, SETTING, SYNONYM, TABLE_OR_VIEW, TRIGGER, USER, USER_DATATYPE
    • Constructor Summary

      Constructors 
      Constructor Description
      ReduceTableWrapper​(org.h2.schema.Schema schema, int id, String name, boolean persistIndexes, boolean persistData)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addDependencies​(HashSet<org.h2.engine.DbObject> dependencies)
      org.h2.index.Index addIndex​(org.h2.engine.Session session, String indexName, int indexId, org.h2.table.IndexColumn[] cols, org.h2.index.IndexType indexType, boolean create, String indexComment)
      void addRow​(org.h2.engine.Session session, org.h2.result.Row row)
      boolean canDrop()
      boolean canGetRowCount()
      void checkRename()
      void checkSupportAlter()
      void close​(org.h2.engine.Session session)
      org.h2.table.PlanItem getBestPlanItem​(org.h2.engine.Session session, int[] masks, org.h2.table.TableFilter[] filters, int filter, org.h2.result.SortOrder sortOrder, HashSet<org.h2.table.Column> cols)
      org.h2.table.Column getColumn​(int index)
      org.h2.table.Column getColumn​(String columnName)
      org.h2.table.Column[] getColumns()
      String getCreateSQL()
      org.h2.value.Value getDefaultValue​(org.h2.engine.Session session, org.h2.table.Column column)
      long getDiskSpaceUsed()
      String getDropSQL()
      ArrayList<org.h2.index.Index> getIndexes()
      org.h2.index.Index getIndexForColumn​(org.h2.table.Column column, boolean needGetFirstOrLast, boolean needFindNext)
      long getMaxDataModificationId()
      org.h2.index.Index getPrimaryKey()
      long getRowCount​(org.h2.engine.Session session)
      long getRowCountApproximation()
      org.h2.table.Column getRowIdColumn()
      org.h2.index.Index getScanIndex​(org.h2.engine.Session session)
      org.h2.table.TableType getTableType()
      org.h2.result.Row getTemplateRow()
      org.h2.result.SearchRow getTemplateSimpleRow​(boolean singleColumn)
      org.h2.index.Index getUniqueIndex()
      void innerTable​(ReduceTable t)  
      boolean isDeterministic()
      boolean isLockedExclusively()
      boolean lock​(org.h2.engine.Session session, boolean exclusive, boolean force)
      void removeRow​(org.h2.engine.Session session, org.h2.result.Row row)
      protected void setColumns​(org.h2.table.Column[] columns)
      void truncate​(org.h2.engine.Session session)
      void unlock​(org.h2.engine.Session s)
      • Methods inherited from class org.h2.table.Table

        addConstraint, addDependentView, addSequence, addSynonym, addTrigger, canReference, canTruncate, checkDeadlock, checkWritingAllowed, commit, compareTypeSafe, doesColumnExist, dropMultipleColumnsConstraintsAndIndexes, findPrimaryKey, fire, fireAfterRow, fireBeforeRow, fireRow, getCheckForeignKeyConstraints, getChildren, getCompareMode, getConstraints, getCreateSQLForCopy, getDependentViews, getIndex, getOnCommitDrop, getOnCommitTruncate, getOnUpdateValue, getRow, getScanIndex, getType, hasSelectTrigger, isGlobalTemporary, isHidden, isLockedExclusivelyBy, isMVStore, isPersistData, isPersistIndexes, isQueryComparable, isTableExpression, isView, removeChildrenAndResources, removeConstraint, removeDependentView, removeIndex, removeIndexOrTransferOwnership, removeSequence, removeSynonym, removeTrigger, rename, renameColumn, setCheckForeignKeyConstraints, setHidden, setOnCommitDrop, setOnCommitTruncate, setTableExpression, updateRows, validateConvertUpdateSequence
      • Methods inherited from class org.h2.schema.SchemaObjectBase

        getSchema, getSQL, initSchemaObjectBase
      • Methods inherited from class org.h2.engine.DbObjectBase

        getComment, getDatabase, getId, getModificationId, getName, initDbObjectBase, invalidate, isTemporary, isValid, setComment, setModified, setObjectName, setTemporary, toString
      • Methods inherited from interface org.h2.engine.DbObject

        getComment, getDatabase, getId, getName, isTemporary, setComment, setTemporary
    • Constructor Detail

      • ReduceTableWrapper

        public ReduceTableWrapper​(org.h2.schema.Schema schema,
                                  int id,
                                  String name,
                                  boolean persistIndexes,
                                  boolean persistData)
        Parameters:
        schema - Schema.
        id - ID.
        name - Table name.
        persistIndexes - Persist indexes.
        persistData - Persist data.
    • Method Detail

      • innerTable

        public void innerTable​(ReduceTable t)
        Parameters:
        t - Table or null to reset existing.
      • getPrimaryKey

        public org.h2.index.Index getPrimaryKey()
        Overrides:
        getPrimaryKey in class org.h2.table.Table
      • getRowIdColumn

        public org.h2.table.Column getRowIdColumn()
        Overrides:
        getRowIdColumn in class org.h2.table.Table
      • getBestPlanItem

        public org.h2.table.PlanItem getBestPlanItem​(org.h2.engine.Session session,
                                                     int[] masks,
                                                     org.h2.table.TableFilter[] filters,
                                                     int filter,
                                                     org.h2.result.SortOrder sortOrder,
                                                     HashSet<org.h2.table.Column> cols)
        Overrides:
        getBestPlanItem in class org.h2.table.Table
      • getDefaultValue

        public org.h2.value.Value getDefaultValue​(org.h2.engine.Session session,
                                                  org.h2.table.Column column)
        Overrides:
        getDefaultValue in class org.h2.table.Table
      • getTemplateSimpleRow

        public org.h2.result.SearchRow getTemplateSimpleRow​(boolean singleColumn)
        Overrides:
        getTemplateSimpleRow in class org.h2.table.Table
      • getTemplateRow

        public org.h2.result.Row getTemplateRow()
        Overrides:
        getTemplateRow in class org.h2.table.Table
      • getColumn

        public org.h2.table.Column getColumn​(String columnName)
        Overrides:
        getColumn in class org.h2.table.Table
      • getColumn

        public org.h2.table.Column getColumn​(int index)
        Overrides:
        getColumn in class org.h2.table.Table
      • getIndexForColumn

        public org.h2.index.Index getIndexForColumn​(org.h2.table.Column column,
                                                    boolean needGetFirstOrLast,
                                                    boolean needFindNext)
        Overrides:
        getIndexForColumn in class org.h2.table.Table
      • getColumns

        public org.h2.table.Column[] getColumns()
        Overrides:
        getColumns in class org.h2.table.Table
      • setColumns

        protected void setColumns​(org.h2.table.Column[] columns)
        Overrides:
        setColumns in class org.h2.table.Table
      • lock

        public boolean lock​(org.h2.engine.Session session,
                            boolean exclusive,
                            boolean force)
        Specified by:
        lock in class org.h2.table.Table
      • close

        public void close​(org.h2.engine.Session session)
        Specified by:
        close in class org.h2.table.Table
      • unlock

        public void unlock​(org.h2.engine.Session s)
        Specified by:
        unlock in class org.h2.table.Table
      • addIndex

        public org.h2.index.Index addIndex​(org.h2.engine.Session session,
                                           String indexName,
                                           int indexId,
                                           org.h2.table.IndexColumn[] cols,
                                           org.h2.index.IndexType indexType,
                                           boolean create,
                                           String indexComment)
        Specified by:
        addIndex in class org.h2.table.Table
      • removeRow

        public void removeRow​(org.h2.engine.Session session,
                              org.h2.result.Row row)
        Specified by:
        removeRow in class org.h2.table.Table
      • truncate

        public void truncate​(org.h2.engine.Session session)
        Specified by:
        truncate in class org.h2.table.Table
      • addRow

        public void addRow​(org.h2.engine.Session session,
                           org.h2.result.Row row)
        Specified by:
        addRow in class org.h2.table.Table
      • checkSupportAlter

        public void checkSupportAlter()
        Specified by:
        checkSupportAlter in class org.h2.table.Table
      • getTableType

        public org.h2.table.TableType getTableType()
        Specified by:
        getTableType in class org.h2.table.Table
      • getUniqueIndex

        public org.h2.index.Index getUniqueIndex()
        Specified by:
        getUniqueIndex in class org.h2.table.Table
      • getScanIndex

        public org.h2.index.Index getScanIndex​(org.h2.engine.Session session)
        Specified by:
        getScanIndex in class org.h2.table.Table
      • getIndexes

        public ArrayList<org.h2.index.Index> getIndexes()
        Specified by:
        getIndexes in class org.h2.table.Table
      • isLockedExclusively

        public boolean isLockedExclusively()
        Specified by:
        isLockedExclusively in class org.h2.table.Table
      • getMaxDataModificationId

        public long getMaxDataModificationId()
        Specified by:
        getMaxDataModificationId in class org.h2.table.Table
      • isDeterministic

        public boolean isDeterministic()
        Specified by:
        isDeterministic in class org.h2.table.Table
      • canGetRowCount

        public boolean canGetRowCount()
        Specified by:
        canGetRowCount in class org.h2.table.Table
      • canDrop

        public boolean canDrop()
        Specified by:
        canDrop in class org.h2.table.Table
      • getRowCount

        public long getRowCount​(org.h2.engine.Session session)
        Specified by:
        getRowCount in class org.h2.table.Table
      • getRowCountApproximation

        public long getRowCountApproximation()
        Specified by:
        getRowCountApproximation in class org.h2.table.Table
      • getDiskSpaceUsed

        public long getDiskSpaceUsed()
        Specified by:
        getDiskSpaceUsed in class org.h2.table.Table
      • getCreateSQL

        public String getCreateSQL()
        Specified by:
        getCreateSQL in interface org.h2.engine.DbObject
        Specified by:
        getCreateSQL in class org.h2.engine.DbObjectBase
      • getDropSQL

        public String getDropSQL()
        Specified by:
        getDropSQL in interface org.h2.engine.DbObject
        Specified by:
        getDropSQL in class org.h2.engine.DbObjectBase
      • addDependencies

        public void addDependencies​(HashSet<org.h2.engine.DbObject> dependencies)
        Overrides:
        addDependencies in class org.h2.table.Table
      • checkRename

        public void checkRename()
        Specified by:
        checkRename in interface org.h2.engine.DbObject
        Specified by:
        checkRename in class org.h2.engine.DbObjectBase