Class ColumnWriterOptions

java.lang.Object
ai.rapids.cudf.ColumnWriterOptions
Direct Known Subclasses:
ColumnWriterOptions.ListColumnWriterOptions, ColumnWriterOptions.StructColumnWriterOptions

public class ColumnWriterOptions extends Object
Per column settings for writing Parquet/ORC files. The native also uses the same "column_in_metadata" for both Parquet and ORC.
  • Field Details

    • UNKNOWN_PRECISION

      public static int UNKNOWN_PRECISION
    • childColumnOptions

      protected ColumnWriterOptions[] childColumnOptions
  • Constructor Details

    • ColumnWriterOptions

      public ColumnWriterOptions(String columnName, boolean isTimestampTypeInt96, int precision, boolean isNullable)
    • ColumnWriterOptions

      public ColumnWriterOptions(String columnName, boolean isTimestampTypeInt96, int precision, boolean isNullable, int parquetFieldId)
    • ColumnWriterOptions

      public ColumnWriterOptions(String columnName, boolean isNullable)
    • ColumnWriterOptions

      public ColumnWriterOptions(String columnName, boolean isNullable, int parquetFieldId)
    • ColumnWriterOptions

      public ColumnWriterOptions(String columnName)
  • Method Details

    • getFlatBooleans

      protected boolean[] getFlatBooleans(boolean[] ret, ColumnWriterOptions.ByteArrayProducer producer)
    • getFlatInts

      protected int[] getFlatInts(int[] ret, ColumnWriterOptions.IntArrayProducer producer)
    • getFlatColumnNames

      protected String[] getFlatColumnNames(String[] ret)
    • mapColumn

      @Deprecated public static ColumnWriterOptions mapColumn(String name, ColumnWriterOptions key, ColumnWriterOptions value)
      Deprecated.
      Add a Map Column to the schema.

      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`.

    • mapColumn

      public static ColumnWriterOptions mapColumn(String name, ColumnWriterOptions key, ColumnWriterOptions value, Boolean isNullable)
      Add a Map Column to the schema.

      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.

      Parameters:
      isNullable - is the returned map nullable.
    • listBuilder

      public static ColumnWriterOptions.ListBuilder listBuilder(String name)
      Creates a ListBuilder for column called 'name'
    • listBuilder

      public static ColumnWriterOptions.ListBuilder listBuilder(String name, boolean isNullable)
      Creates a ListBuilder for column called 'name'
    • structBuilder

      public static ColumnWriterOptions.StructBuilder structBuilder(String name, boolean isNullable)
      Creates a StructBuilder for column called 'name'
    • structBuilder

      public static ColumnWriterOptions.StructBuilder structBuilder(String name, boolean isNullable, int parquetFieldId)
      Creates a StructBuilder for column called 'name'
    • structBuilder

      public static ColumnWriterOptions.StructBuilder structBuilder(String name)
      Creates a StructBuilder for column called 'name'
    • getColumnName

      public String getColumnName()
      Return if the column can have null values
    • isNullable

      public boolean isNullable()
      Return if the column can have null values
    • getPrecision

      public int getPrecision()
      Return the precision for this column
    • isTimestampTypeInt96

      public boolean isTimestampTypeInt96()
      Returns true if the writer is expected to write timestamps in INT96
    • getChildColumnOptions

      public ColumnWriterOptions[] getChildColumnOptions()
      Return the child columnOptions for this column