Class Schema.Builder

java.lang.Object
ai.rapids.cudf.Schema.Builder
Enclosing class:
Schema

public static class Schema.Builder extends Object
  • Method Details

    • addColumn

      public Schema.Builder addColumn(DType type, String name, int precision)
      Add a new column
      Parameters:
      type - the type of column to add
      name - the name of the column to add (Ignored for list types)
      precision - the decimal precision, only applicable for decimal types
      Returns:
      the builder for the new column. This should really only be used when the type passed in is a LIST or a STRUCT.
    • addColumn

      public Schema.Builder addColumn(DType type, String name)
    • column

      public Schema.Builder column(DType type, String name, int precision)
      Adds a single column to the current schema. addColumn is preferred as it can be used to support nested types.
      Parameters:
      type - the type of the column.
      name - the name of the column.
      precision - the decimal precision, only applicable for decimal types.
      Returns:
      this for chaining.
    • column

      public Schema.Builder column(DType type, String name)
    • build

      public Schema build()