Class: Hive::Thrift::Operator

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/thrift/queryplan_types.rb

Constant Summary collapse

OPERATORID =
1
OPERATORTYPE =
2
OPERATORATTRIBUTES =
3
OPERATORCOUNTERS =
4
DONE =
5
STARTED =
6
FIELDS =
{
  OPERATORID => {:type => ::Thrift::Types::STRING, :name => 'operatorId'},
  OPERATORTYPE => {:type => ::Thrift::Types::I32, :name => 'operatorType', :enum_class => ::Hive::Thrift::OperatorType},
  OPERATORATTRIBUTES => {:type => ::Thrift::Types::MAP, :name => 'operatorAttributes', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}},
  OPERATORCOUNTERS => {:type => ::Thrift::Types::MAP, :name => 'operatorCounters', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::I64}},
  DONE => {:type => ::Thrift::Types::BOOL, :name => 'done'},
  STARTED => {:type => ::Thrift::Types::BOOL, :name => 'started'}
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject


135
# File 'lib/thrift/queryplan_types.rb', line 135

def struct_fields; FIELDS; end

#validateObject


137
138
139
140
141
# File 'lib/thrift/queryplan_types.rb', line 137

def validate
  unless @operatorType.nil? || ::Hive::Thrift::OperatorType::VALID_VALUES.include?(@operatorType)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field operatorType!')
  end
end