Class: Arrow::LargeListDataType

Inherits:
Object
  • Object
show all
Includes:
ListFieldResolvable
Defined in:
lib/arrow/large-list-data-type.rb

Instance Method Summary collapse

Constructor Details

#initialize(field) ⇒ LargeListDataType #initialize(description) ⇒ LargeListDataType #initialize(data_type) ⇒ LargeListDataType

Creates a new Arrow::LargeListDataType.

Overloads:

  • #initialize(field) ⇒ LargeListDataType

    Examples:

    Create a large list data type with Field

    visible_field = Arrow::Field.new("visible", :boolean)
    Arrow::LargeListDataType.new(visible_field)

    Create a large list data type with field description

    Arrow::LargeListDataType.new(name: "visible", type: :boolean)

    Parameters:

    • field (Arrow::Field, Hash)

      The field of the large list data type. You can also specify field description by Hash.

      See Field.new how to specify field description.

  • #initialize(description) ⇒ LargeListDataType

    Examples:

    Create a large list data type with Field

    visible_field = Arrow::Field.new("visible", :boolean)
    Arrow::LargeListDataType.new(field: visible_field)

    Create a large list data type with field description

    Arrow::LargeListDataType.new(field: {name: "visible", type: :boolean})

    Parameters:

    • description (Hash)

      The description of the large list data type. It must have :field value.

    Options Hash (description):

    • :field (Arrow::Field, Hash)

      The field of the large list data type. You can also specify field description by Hash.

      See Field.new how to specify field description.

  • #initialize(data_type) ⇒ LargeListDataType

    Examples:

    Create a large list data type with DataType

    Arrow::LargeListDataType.new(Arrow::BooleanDataType.new)

    Create a large list data type with data type name as String

    Arrow::LargeListDataType.new("boolean")

    Create a large list data type with data type name as Symbol

    Arrow::LargeListDataType.new(:boolean)

    Create a large list data type with data type as Array

    Arrow::LargeListDataType.new([:time32, :milli])

    Parameters:

    • data_type (Arrow::DataType, String, Symbol, ::Array<String>, ::Array<Symbol>, Hash)

      The element data type of the large list data type. A field is created with the default name ‘“item”` from the data type automatically.

      See DataType.resolve how to specify data type.



79
80
81
# File 'lib/arrow/large-list-data-type.rb', line 79

def initialize(arg)
  initialize_raw(resolve_field(arg))
end