Class: Impala::Protocol::TSlotDescriptor

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/impala/protocol/descriptors_types.rb

Constant Summary collapse

ID =
1
PARENT =
2
SLOTTYPE =
3
COLUMNPOS =
4
BYTEOFFSET =
5
NULLINDICATORBYTE =
6
NULLINDICATORBIT =
7
SLOTIDX =
9
ISMATERIALIZED =
10
FIELDS =
{
ID => { :type => ::Thrift::Types::I32, :name => 'id' },
PARENT => { :type => ::Thrift::Types::I32, :name => 'parent' },
SLOTTYPE => { :type => ::Thrift::Types::I32, :name => 'slotType', :enum_class => Impala::Protocol::TPrimitiveType },
COLUMNPOS => { :type => ::Thrift::Types::I32, :name => 'columnPos' },
BYTEOFFSET => { :type => ::Thrift::Types::I32, :name => 'byteOffset' },
NULLINDICATORBYTE => { :type => ::Thrift::Types::I32, :name => 'nullIndicatorByte' },
NULLINDICATORBIT => { :type => ::Thrift::Types::I32, :name => 'nullIndicatorBit' },
SLOTIDX => { :type => ::Thrift::Types::I32, :name => 'slotIdx' },
ISMATERIALIZED => { :type => ::Thrift::Types::BOOL, :name => 'isMaterialized' }
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



65
# File 'lib/impala/protocol/descriptors_types.rb', line 65

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/impala/protocol/descriptors_types.rb', line 67

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field id is unset!') unless @id
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field parent is unset!') unless @parent
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field slotType is unset!') unless @slotType
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columnPos is unset!') unless @columnPos
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field byteOffset is unset!') unless @byteOffset
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field nullIndicatorByte is unset!') unless @nullIndicatorByte
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field nullIndicatorBit is unset!') unless @nullIndicatorBit
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field slotIdx is unset!') unless @slotIdx
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field isMaterialized is unset!') if @isMaterialized.nil?
  unless @slotType.nil? || Impala::Protocol::TPrimitiveType::VALID_VALUES.include?(@slotType)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field slotType!')
  end
end