Class ColumnIndexFilter
- java.lang.Object
-
- org.apache.parquet.internal.filter2.columnindex.ColumnIndexFilter
-
- All Implemented Interfaces:
FilterPredicate.Visitor<RowRanges>
public class ColumnIndexFilter extends Object implements FilterPredicate.Visitor<RowRanges>
Filter implementation based on column indexes. No filtering will be applied for columns where no column index is available. Offset index is required for all the columns in the projection, therefore aColumnIndexStore.MissingOffsetIndexExceptionwill be thrown from anyvisitmethods if any of the required offset indexes is missing.
-
-
Method Summary
-
-
-
Method Detail
-
calculateRowRanges
public static RowRanges calculateRowRanges(FilterCompat.Filter filter, ColumnIndexStore columnIndexStore, Set<org.apache.parquet.hadoop.metadata.ColumnPath> paths, long rowCount)
Calculates the row ranges containing the indexes of the rows might match the specified filter.- Parameters:
filter- to be used for filtering the rowscolumnIndexStore- the store for providing column/offset indexespaths- the paths of the columns used in the actual projection; a column not being part of the projection will be handled as containingnullvalues only even if the column has values written in the filerowCount- the total number of rows in the row-group- Returns:
- the ranges of the possible matching row indexes; the returned ranges will contain all the rows if any of the required offset index is missing
-
visit
public <T extends Comparable<T>> RowRanges visit(Operators.Eq<T> eq)
- Specified by:
visitin interfaceFilterPredicate.Visitor<RowRanges>
-
visit
public <T extends Comparable<T>> RowRanges visit(Operators.NotEq<T> notEq)
- Specified by:
visitin interfaceFilterPredicate.Visitor<RowRanges>
-
visit
public <T extends Comparable<T>> RowRanges visit(Operators.Lt<T> lt)
- Specified by:
visitin interfaceFilterPredicate.Visitor<RowRanges>
-
visit
public <T extends Comparable<T>> RowRanges visit(Operators.LtEq<T> ltEq)
- Specified by:
visitin interfaceFilterPredicate.Visitor<RowRanges>
-
visit
public <T extends Comparable<T>> RowRanges visit(Operators.Gt<T> gt)
- Specified by:
visitin interfaceFilterPredicate.Visitor<RowRanges>
-
visit
public <T extends Comparable<T>> RowRanges visit(Operators.GtEq<T> gtEq)
- Specified by:
visitin interfaceFilterPredicate.Visitor<RowRanges>
-
visit
public <T extends Comparable<T>> RowRanges visit(Operators.In<T> in)
- Specified by:
visitin interfaceFilterPredicate.Visitor<RowRanges>
-
visit
public <T extends Comparable<T>> RowRanges visit(Operators.NotIn<T> notIn)
- Specified by:
visitin interfaceFilterPredicate.Visitor<RowRanges>
-
visit
public <T extends Comparable<T>,U extends UserDefinedPredicate<T>> RowRanges visit(Operators.UserDefined<T,U> udp)
- Specified by:
visitin interfaceFilterPredicate.Visitor<RowRanges>
-
visit
public <T extends Comparable<T>,U extends UserDefinedPredicate<T>> RowRanges visit(Operators.LogicalNotUserDefined<T,U> udp)
- Specified by:
visitin interfaceFilterPredicate.Visitor<RowRanges>
-
visit
public RowRanges visit(Operators.And and)
- Specified by:
visitin interfaceFilterPredicate.Visitor<RowRanges>
-
visit
public RowRanges visit(Operators.Or or)
- Specified by:
visitin interfaceFilterPredicate.Visitor<RowRanges>
-
visit
public RowRanges visit(Operators.Not not)
- Specified by:
visitin interfaceFilterPredicate.Visitor<RowRanges>
-
-