Class DeprecatedQueryableIndexColumnSelector

  • All Implemented Interfaces:
    Expr.InputBindingInspector, ColumnInspector, ColumnSelector

    @Deprecated
    public class DeprecatedQueryableIndexColumnSelector
    extends Object
    implements ColumnSelector
    Deprecated.
    It likely looks weird that we are creating a new instance of ColumnSelector here that begins its life deprecated and only delegates methods to the Queryable Index. This is done intentionally so that the QueryableIndex doesn't accidentally get used as a ColumnSelector. The lifecycle of the QueryableIndex is over the lifetime of the segment on a specific process, while the ColumnSelector's lifecycle is for a given query. When we don't use the same ColumnSelector for an entire query, we defeat caching and use a lot more resources than necessary for queries. Places that use this class are intentionally circumventing column caching and column lifecycle management, ostensibly because those code locations know that they are only looking at metadata. If a code path uses this and actually accesses a column instead of just looking at metadata, it will leak any resources that said column requires. The ColumnCache is the preferred implementation of a ColumnSelector, it takes a Closer and that closer can be used to ensure that resources are cleaned up.