Class: Hive2::Thrift::TColumn

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
BINARYVAL =
8
FIELDS =
{
  BOOLVAL => {:type => ::Thrift::Types::STRUCT, :name => 'boolVal', :class => ::Hive2::Thrift::TBoolColumn},
  BYTEVAL => {:type => ::Thrift::Types::STRUCT, :name => 'byteVal', :class => ::Hive2::Thrift::TByteColumn},
  I16VAL => {:type => ::Thrift::Types::STRUCT, :name => 'i16Val', :class => ::Hive2::Thrift::TI16Column},
  I32VAL => {:type => ::Thrift::Types::STRUCT, :name => 'i32Val', :class => ::Hive2::Thrift::TI32Column},
  I64VAL => {:type => ::Thrift::Types::STRUCT, :name => 'i64Val', :class => ::Hive2::Thrift::TI64Column},
  DOUBLEVAL => {:type => ::Thrift::Types::STRUCT, :name => 'doubleVal', :class => ::Hive2::Thrift::TDoubleColumn},
  STRINGVAL => {:type => ::Thrift::Types::STRUCT, :name => 'stringVal', :class => ::Hive2::Thrift::TStringColumn},
  BINARYVAL => {:type => ::Thrift::Types::STRUCT, :name => 'binaryVal', :class => ::Hive2::Thrift::TBinaryColumn}
}

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.binaryVal(val) ⇒ Object


795
796
797
# File 'lib/thrift/t_c_l_i_service_types.rb', line 795

def binaryVal(val)
  TColumn.new(:binaryVal, val)
end

.boolVal(val) ⇒ Object


767
768
769
# File 'lib/thrift/t_c_l_i_service_types.rb', line 767

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

.byteVal(val) ⇒ Object


771
772
773
# File 'lib/thrift/t_c_l_i_service_types.rb', line 771

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

.doubleVal(val) ⇒ Object


787
788
789
# File 'lib/thrift/t_c_l_i_service_types.rb', line 787

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

.i16Val(val) ⇒ Object


775
776
777
# File 'lib/thrift/t_c_l_i_service_types.rb', line 775

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

.i32Val(val) ⇒ Object


779
780
781
# File 'lib/thrift/t_c_l_i_service_types.rb', line 779

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

.i64Val(val) ⇒ Object


783
784
785
# File 'lib/thrift/t_c_l_i_service_types.rb', line 783

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

.stringVal(val) ⇒ Object


791
792
793
# File 'lib/thrift/t_c_l_i_service_types.rb', line 791

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

Instance Method Details

#struct_fieldsObject


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

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (StandardError)

822
823
824
# File 'lib/thrift/t_c_l_i_service_types.rb', line 822

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