public class ColumnWriterOptions extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
ColumnWriterOptions.AbstractStructBuilder<T extends ColumnWriterOptions.AbstractStructBuilder,V extends ColumnWriterOptions> |
protected static interface |
ColumnWriterOptions.ByteArrayProducer |
protected static interface |
ColumnWriterOptions.IntArrayProducer |
static class |
ColumnWriterOptions.ListBuilder |
static class |
ColumnWriterOptions.ListColumnWriterOptions |
static class |
ColumnWriterOptions.NestedBuilder<T extends ColumnWriterOptions.NestedBuilder,V extends ColumnWriterOptions> |
static class |
ColumnWriterOptions.StructBuilder |
static class |
ColumnWriterOptions.StructColumnWriterOptions |
Modifier and Type | Field and Description |
---|---|
protected ColumnWriterOptions[] |
childColumnOptions |
static int |
UNKNOWN_PRECISION |
Constructor and Description |
---|
ColumnWriterOptions(String columnName) |
ColumnWriterOptions(String columnName,
boolean isNullable) |
ColumnWriterOptions(String columnName,
boolean isNullable,
int parquetFieldId) |
ColumnWriterOptions(String columnName,
boolean isTimestampTypeInt96,
int precision,
boolean isNullable) |
ColumnWriterOptions(String columnName,
boolean isTimestampTypeInt96,
int precision,
boolean isNullable,
int parquetFieldId) |
Modifier and Type | Method and Description |
---|---|
ColumnWriterOptions[] |
getChildColumnOptions()
Return the child columnOptions for this column
|
String |
getColumnName()
Return if the column can have null values
|
protected boolean[] |
getFlatBooleans(boolean[] ret,
ColumnWriterOptions.ByteArrayProducer producer) |
protected String[] |
getFlatColumnNames(String[] ret) |
protected int[] |
getFlatInts(int[] ret,
ColumnWriterOptions.IntArrayProducer producer) |
int |
getPrecision()
Return the precision for this column
|
boolean |
isNullable()
Return if the column can have null values
|
boolean |
isTimestampTypeInt96()
Returns true if the writer is expected to write timestamps in INT96
|
static ColumnWriterOptions.ListBuilder |
listBuilder(String name)
Creates a ListBuilder for column called 'name'
|
static ColumnWriterOptions.ListBuilder |
listBuilder(String name,
boolean isNullable)
Creates a ListBuilder for column called 'name'
|
static ColumnWriterOptions |
mapColumn(String name,
ColumnWriterOptions key,
ColumnWriterOptions value)
Deprecated.
|
static ColumnWriterOptions |
mapColumn(String name,
ColumnWriterOptions key,
ColumnWriterOptions value,
Boolean isNullable)
Add a Map Column to the schema.
|
static ColumnWriterOptions.StructBuilder |
structBuilder(String name)
Creates a StructBuilder for column called 'name'
|
static ColumnWriterOptions.StructBuilder |
structBuilder(String name,
boolean isNullable)
Creates a StructBuilder for column called 'name'
|
static ColumnWriterOptions.StructBuilder |
structBuilder(String name,
boolean isNullable,
int parquetFieldId)
Creates a StructBuilder for column called 'name'
|
public static int UNKNOWN_PRECISION
protected ColumnWriterOptions[] childColumnOptions
public ColumnWriterOptions(String columnName, boolean isTimestampTypeInt96, int precision, boolean isNullable)
public ColumnWriterOptions(String columnName, boolean isTimestampTypeInt96, int precision, boolean isNullable, int parquetFieldId)
public ColumnWriterOptions(String columnName, boolean isNullable)
public ColumnWriterOptions(String columnName, boolean isNullable, int parquetFieldId)
public ColumnWriterOptions(String columnName)
protected boolean[] getFlatBooleans(boolean[] ret, ColumnWriterOptions.ByteArrayProducer producer)
protected int[] getFlatInts(int[] ret, ColumnWriterOptions.IntArrayProducer producer)
@Deprecated public static ColumnWriterOptions mapColumn(String name, ColumnWriterOptions key, ColumnWriterOptions value)
Maps are List columns with a Struct named 'key_value' with a child named 'key' and a child named 'value'. The caller of this method doesn't need to worry about this as this method will take care of this without the knowledge of the caller. Note: This method always returns a nullabe column, cannot return non-nullable column. Do not use this, use the next function with the parameter `isNullable`.
public static ColumnWriterOptions mapColumn(String name, ColumnWriterOptions key, ColumnWriterOptions value, Boolean isNullable)
Maps are List columns with a Struct named 'key_value' with a child named 'key' and a child named 'value'. The caller of this method doesn't need to worry about this as this method will take care of this without the knowledge of the caller. Note: If this map column is a key of another map, should pass isNullable = false. e.g.: map1(map2(int, int), int) the map2 should be non-nullable.
isNullable
- is the returned map nullable.public static ColumnWriterOptions.ListBuilder listBuilder(String name)
public static ColumnWriterOptions.ListBuilder listBuilder(String name, boolean isNullable)
public static ColumnWriterOptions.StructBuilder structBuilder(String name, boolean isNullable)
public static ColumnWriterOptions.StructBuilder structBuilder(String name, boolean isNullable, int parquetFieldId)
public static ColumnWriterOptions.StructBuilder structBuilder(String name)
public String getColumnName()
public boolean isNullable()
public int getPrecision()
public boolean isTimestampTypeInt96()
public ColumnWriterOptions[] getChildColumnOptions()
Copyright © 2024. All rights reserved.