Class ColumnIndexBuilder
- java.lang.Object
-
- org.apache.parquet.internal.column.columnindex.ColumnIndexBuilder
-
public abstract class ColumnIndexBuilder extends Object
Builder implementation to createColumnIndex
objects.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Statistics<?> stats)
Adds the data from the specified statistics to this builderColumnIndex
build()
static ColumnIndex
build(PrimitiveType type, BoundaryOrder boundaryOrder, List<Boolean> nullPages, List<Long> nullCounts, List<ByteBuffer> minValues, List<ByteBuffer> maxValues)
static ColumnIndexBuilder
getBuilder(PrimitiveType type, int truncateLength)
long
getMinMaxSize()
static ColumnIndexBuilder
getNoOpBuilder()
int
getPageCount()
-
-
-
Method Detail
-
getNoOpBuilder
public static ColumnIndexBuilder getNoOpBuilder()
- Returns:
- a no-op builder that does not collect statistics objects and therefore returns
null
atbuild()
.
-
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
ColumnIndexBuilder
instance to be used for creatingColumnIndex
objects
-
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
ColumnIndex
object 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
null
if theColumnIndex
would 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
-
-