Class: Hive2::Thrift::TColumnValue

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

Constant Summary collapse

BOOLVAL =
1
BYTEVAL =
2
I16VAL =
3
I32VAL =
4
I64VAL =
5
DOUBLEVAL =
6
STRINGVAL =
7
FIELDS =
{
  BOOLVAL => {:type => ::Thrift::Types::STRUCT, :name => 'boolVal', :class => ::Hive2::Thrift::TBoolValue},
  BYTEVAL => {:type => ::Thrift::Types::STRUCT, :name => 'byteVal', :class => ::Hive2::Thrift::TByteValue},
  I16VAL => {:type => ::Thrift::Types::STRUCT, :name => 'i16Val', :class => ::Hive2::Thrift::TI16Value},
  I32VAL => {:type => ::Thrift::Types::STRUCT, :name => 'i32Val', :class => ::Hive2::Thrift::TI32Value},
  I64VAL => {:type => ::Thrift::Types::STRUCT, :name => 'i64Val', :class => ::Hive2::Thrift::TI64Value},
  DOUBLEVAL => {:type => ::Thrift::Types::STRUCT, :name => 'doubleVal', :class => ::Hive2::Thrift::TDoubleValue},
  STRINGVAL => {:type => ::Thrift::Types::STRUCT, :name => 'stringVal', :class => ::Hive2::Thrift::TStringValue}
}

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.boolVal(val) ⇒ Object


531
532
533
# File 'lib/thrift/t_c_l_i_service_types.rb', line 531

def boolVal(val)
  TColumnValue.new(:boolVal, val)
end

.byteVal(val) ⇒ Object


535
536
537
# File 'lib/thrift/t_c_l_i_service_types.rb', line 535

def byteVal(val)
  TColumnValue.new(:byteVal, val)
end

.doubleVal(val) ⇒ Object


551
552
553
# File 'lib/thrift/t_c_l_i_service_types.rb', line 551

def doubleVal(val)
  TColumnValue.new(:doubleVal, val)
end

.i16Val(val) ⇒ Object


539
540
541
# File 'lib/thrift/t_c_l_i_service_types.rb', line 539

def i16Val(val)
  TColumnValue.new(:i16Val, val)
end

.i32Val(val) ⇒ Object


543
544
545
# File 'lib/thrift/t_c_l_i_service_types.rb', line 543

def i32Val(val)
  TColumnValue.new(:i32Val, val)
end

.i64Val(val) ⇒ Object


547
548
549
# File 'lib/thrift/t_c_l_i_service_types.rb', line 547

def i64Val(val)
  TColumnValue.new(:i64Val, val)
end

.stringVal(val) ⇒ Object


555
556
557
# File 'lib/thrift/t_c_l_i_service_types.rb', line 555

def stringVal(val)
  TColumnValue.new(:stringVal, val)
end

Instance Method Details

#struct_fieldsObject


578
# File 'lib/thrift/t_c_l_i_service_types.rb', line 578

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (StandardError)

580
581
582
# File 'lib/thrift/t_c_l_i_service_types.rb', line 580

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