Class: Icss::MapType

Inherits:
EnumerableType show all
Defined in:
lib/icss/type.rb

Overview

MapType describes an Avro Map type (which corresponds to a Ruby Hash). HashType is a synonym for MapType.

Maps use the type name “map” and support one attribute:

  • values: the schema of the map’s values. Avro Map keys are assumed to be strings.

@example, a map from string to long is declared with:

{"type": "map", "values": "long"}

Constant Summary

Constants inherited from Type

Type::PRIMITIVE_TYPES

Instance Method Summary collapse

Methods inherited from Type

find, pig_name, primitive?, #primitive?, #title, #to_json

Instance Method Details

#to_hashObject



443
444
445
# File 'lib/icss/type.rb', line 443

def to_hash
  super.merge( :values => values.to_hash )
end