Class: Impala::Protocol::TTypeEntry

Inherits:
Thrift::Union
  • Object
show all
Includes:
Thrift::Struct_Union
Defined in:
lib/impala/protocol/t_c_l_i_service_types.rb

Constant Summary collapse

PRIMITIVEENTRY =
1
ARRAYENTRY =
2
MAPENTRY =
3
STRUCTENTRY =
4
UNIONENTRY =
5
USERDEFINEDTYPEENTRY =
6
FIELDS =
{
  PRIMITIVEENTRY => {:type => ::Thrift::Types::STRUCT, :name => 'primitiveEntry', :class => ::Impala::Protocol::TPrimitiveTypeEntry},
  ARRAYENTRY => {:type => ::Thrift::Types::STRUCT, :name => 'arrayEntry', :class => ::Impala::Protocol::TArrayTypeEntry},
  MAPENTRY => {:type => ::Thrift::Types::STRUCT, :name => 'mapEntry', :class => ::Impala::Protocol::TMapTypeEntry},
  STRUCTENTRY => {:type => ::Thrift::Types::STRUCT, :name => 'structEntry', :class => ::Impala::Protocol::TStructTypeEntry},
  UNIONENTRY => {:type => ::Thrift::Types::STRUCT, :name => 'unionEntry', :class => ::Impala::Protocol::TUnionTypeEntry},
  USERDEFINEDTYPEENTRY => {:type => ::Thrift::Types::STRUCT, :name => 'userDefinedTypeEntry', :class => ::Impala::Protocol::TUserDefinedTypeEntry}
}

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.arrayEntry(val) ⇒ Object



313
314
315
# File 'lib/impala/protocol/t_c_l_i_service_types.rb', line 313

def arrayEntry(val)
  TTypeEntry.new(:arrayEntry, val)
end

.mapEntry(val) ⇒ Object



317
318
319
# File 'lib/impala/protocol/t_c_l_i_service_types.rb', line 317

def mapEntry(val)
  TTypeEntry.new(:mapEntry, val)
end

.primitiveEntry(val) ⇒ Object



309
310
311
# File 'lib/impala/protocol/t_c_l_i_service_types.rb', line 309

def primitiveEntry(val)
  TTypeEntry.new(:primitiveEntry, val)
end

.structEntry(val) ⇒ Object



321
322
323
# File 'lib/impala/protocol/t_c_l_i_service_types.rb', line 321

def structEntry(val)
  TTypeEntry.new(:structEntry, val)
end

.unionEntry(val) ⇒ Object



325
326
327
# File 'lib/impala/protocol/t_c_l_i_service_types.rb', line 325

def unionEntry(val)
  TTypeEntry.new(:unionEntry, val)
end

.userDefinedTypeEntry(val) ⇒ Object



329
330
331
# File 'lib/impala/protocol/t_c_l_i_service_types.rb', line 329

def userDefinedTypeEntry(val)
  TTypeEntry.new(:userDefinedTypeEntry, val)
end

Instance Method Details

#struct_fieldsObject



350
# File 'lib/impala/protocol/t_c_l_i_service_types.rb', line 350

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (StandardError)


352
353
354
# File 'lib/impala/protocol/t_c_l_i_service_types.rb', line 352

def validate
  raise(StandardError, 'Union fields are not set.') if get_set_field.nil? || get_value.nil?
end