Class: Impala::Protocol::TColumnDesc
- Inherits:
-
Object
- Object
- Impala::Protocol::TColumnDesc
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/impala/protocol/frontend_types.rb
Constant Summary collapse
- COLUMNNAME =
1
- COLUMNTYPE =
2
- FIELDS =
{ COLUMNNAME => { :type => ::Thrift::Types::STRING, :name => 'columnName' }, COLUMNTYPE => { :type => ::Thrift::Types::I32, :name => 'columnType', :enum_class => Impala::Protocol::TPrimitiveType } }
Instance Method Summary collapse
Instance Method Details
#struct_fields ⇒ Object
101 |
# File 'lib/impala/protocol/frontend_types.rb', line 101 def struct_fields; FIELDS; end |
#validate ⇒ Object
103 104 105 106 107 108 109 |
# File 'lib/impala/protocol/frontend_types.rb', line 103 def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columnName is unset!') unless @columnName raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columnType is unset!') unless @columnType unless @columnType.nil? || Impala::Protocol::TPrimitiveType::VALID_VALUES.include?(@columnType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field columnType!') end end |