Class: Impala::Protocol::TDataPartition
- Inherits:
-
Object
- Object
- Impala::Protocol::TDataPartition
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/impala/protocol/partitions_types.rb
Constant Summary collapse
- TYPE =
1
- PARTITIONING_EXPRS =
2
- FIELDS =
{ TYPE => { :type => ::Thrift::Types::I32, :name => 'type', :enum_class => Impala::Protocol::TPartitionType }, PARTITIONING_EXPRS => { :type => ::Thrift::Types::LIST, :name => 'partitioning_exprs', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TExpr }, :optional => true } }
Instance Method Summary collapse
Instance Method Details
#struct_fields ⇒ Object
31 |
# File 'lib/impala/protocol/partitions_types.rb', line 31 def struct_fields; FIELDS; end |
#validate ⇒ Object
33 34 35 36 37 38 |
# File 'lib/impala/protocol/partitions_types.rb', line 33 def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type unless @type.nil? || Impala::Protocol::TPartitionType::VALID_VALUES.include?(@type) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!') end end |