Class ColumnIndexBuilder
- java.lang.Object
-
- org.apache.parquet.internal.column.columnindex.ColumnIndexBuilder
-
public abstract class ColumnIndexBuilder extends Object
Builder implementation to createColumnIndexobjects.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Statistics<?> stats)Adds the data from the specified statistics to this builderColumnIndexbuild()static ColumnIndexbuild(PrimitiveType type, BoundaryOrder boundaryOrder, List<Boolean> nullPages, List<Long> nullCounts, List<ByteBuffer> minValues, List<ByteBuffer> maxValues)static ColumnIndexBuildergetBuilder(PrimitiveType type, int truncateLength)longgetMinMaxSize()static ColumnIndexBuildergetNoOpBuilder()intgetPageCount()
-
-
-
Method Detail
-
getNoOpBuilder
public static ColumnIndexBuilder getNoOpBuilder()
- Returns:
- a no-op builder that does not collect statistics objects and therefore returns
nullatbuild().
-
getBuilder
public static ColumnIndexBuilder getBuilder(PrimitiveType type, int truncateLength)
- Parameters:
type- the type this builder is to be created fortruncateLength- the length to be used for truncating binary values if possible- Returns:
- a
ColumnIndexBuilderinstance to be used for creatingColumnIndexobjects
-
build
public static ColumnIndex build(PrimitiveType type, BoundaryOrder boundaryOrder, List<Boolean> nullPages, List<Long> nullCounts, List<ByteBuffer> minValues, List<ByteBuffer> maxValues)
- Parameters:
type- the primitive typeboundaryOrder- the boundary order of the min/max valuesnullPages- the null pages (one boolean value for each page that signifies whether the page consists of nulls entirely)nullCounts- the number of null values for each pageminValues- the min values for each pagemaxValues- the max values for each page- Returns:
- the newly created
ColumnIndexobject based on the specified arguments
-
add
public void add(Statistics<?> stats)
Adds the data from the specified statistics to this builder- Parameters:
stats- the statistics to be added
-
build
public ColumnIndex build()
- Returns:
- the newly created column index or
nullif theColumnIndexwould be empty
-
getPageCount
public int getPageCount()
- Returns:
- the number of pages added so far to this builder
-
getMinMaxSize
public long getMinMaxSize()
- Returns:
- the sum of size in bytes of the min/max values added so far to this builder
-
-