Class ColumnIndexBuilder
java.lang.Object
org.apache.parquet.internal.column.columnindex.ColumnIndexBuilder
Builder implementation to create
ColumnIndex objects.-
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Statistics<?> stats) Adds the data from the specified statistics to this buildervoidadd(Statistics<?> stats, SizeStatistics sizeStats) Adds the data from the specified statistics to this builderbuild()static ColumnIndexbuild(PrimitiveType type, BoundaryOrder boundaryOrder, List<Boolean> nullPages, List<Long> nullCounts, List<Long> nanCounts, List<ByteBuffer> minValues, List<ByteBuffer> maxValues, List<Long> repLevelHistogram, List<Long> defLevelHistogram) static ColumnIndexbuild(PrimitiveType type, BoundaryOrder boundaryOrder, List<Boolean> nullPages, List<Long> nullCounts, List<ByteBuffer> minValues, List<ByteBuffer> maxValues) static ColumnIndexbuild(PrimitiveType type, BoundaryOrder boundaryOrder, List<Boolean> nullPages, List<Long> nullCounts, List<ByteBuffer> minValues, List<ByteBuffer> maxValues, List<Long> repLevelHistogram, List<Long> defLevelHistogram) static ColumnIndexBuildergetBuilder(PrimitiveType type, int truncateLength) longstatic ColumnIndexBuilderint
-
Method Details
-
getNoOpBuilder
- Returns:
- a no-op builder that does not collect statistics objects and therefore returns
nullatbuild().
-
getBuilder
- 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
-
build
public static ColumnIndex build(PrimitiveType type, BoundaryOrder boundaryOrder, List<Boolean> nullPages, List<Long> nullCounts, List<ByteBuffer> minValues, List<ByteBuffer> maxValues, List<Long> repLevelHistogram, List<Long> defLevelHistogram) - 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 pagerepLevelHistogram- the repetition level histogram for all levels of each pagedefLevelHistogram- the definition level histogram for all levels of each page- Returns:
- the newly created
ColumnIndexobject based on the specified arguments
-
build
public static ColumnIndex build(PrimitiveType type, BoundaryOrder boundaryOrder, List<Boolean> nullPages, List<Long> nullCounts, List<Long> nanCounts, List<ByteBuffer> minValues, List<ByteBuffer> maxValues, List<Long> repLevelHistogram, List<Long> defLevelHistogram) - 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 pagenanCounts- the number of NaN values for each page (may be null)minValues- the min values for each pagemaxValues- the max values for each pagerepLevelHistogram- the repetition level histogram for all levels of each pagedefLevelHistogram- the definition level histogram for all levels of each page- Returns:
- the newly created
ColumnIndexobject based on the specified arguments
-
add
Adds the data from the specified statistics to this builder- Parameters:
stats- the statistics to be added
-
add
Adds the data from the specified statistics to this builder- Parameters:
stats- the statistics to be addedsizeStats- the size statistics to be added
-
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
-