Class TableCache

  • All Implemented Interfaces:
    PinotConfigProvider

    public class TableCache
    extends Object
    implements PinotConfigProvider
    An implementation of PinotConfigProvider The TableCache caches all the table configs and schemas within the cluster, and listens on ZK changes to keep them in sync. It also maintains the table name map and the column name map for case-insensitive queries.
    • Constructor Detail

      • TableCache

        public TableCache​(org.apache.helix.store.zk.ZkHelixPropertyStore<org.apache.helix.zookeeper.datamodel.ZNRecord> propertyStore,
                          boolean ignoreCase)
    • Method Detail

      • isIgnoreCase

        public boolean isIgnoreCase()
        Returns true if the TableCache is case-insensitive, false otherwise.
      • getActualTableName

        @Nullable
        public String getActualTableName​(String tableName)
        Returns the actual table name for the given table name (with or without type suffix), or null if the table does not exist.
      • getTableNameMap

        public Map<String,​String> getTableNameMap()
        Returns a map from table name to actual table name. For case-insensitive case, the keys of the map are in lower case.
      • getColumnNameMap

        @Nullable
        public Map<String,​String> getColumnNameMap​(String rawTableName)
        Returns a map from column name to actual column name for the given table, or null if the table schema does not exist. For case-insensitive case, the keys of the map are in lower case.
      • getExpressionOverrideMap

        @Nullable
        public Map<Expression,​Expression> getExpressionOverrideMap​(String tableNameWithType)
        Returns the expression override map for the given table, or null if no override is configured.
      • getTimestampIndexColumns

        @Nullable
        public Set<String> getTimestampIndexColumns​(String tableNameWithType)
        Returns the timestamp index columns for the given table, or null if table does not exist.