Sha256: 4811bdf5cd8e1558c50b680239f1f31c65eb71b1c5bcf3372a80b50ad611a1fb

Contents?: true

Size: 1.43 KB

Versions: 7

Compression:

Stored size: 1.43 KB

Contents

#
# Autogenerated by Thrift Compiler (0.8.0)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#

require 'exprs_types'


module Impala
  module Protocol
    module TPartitionType
      UNPARTITIONED = 0
      RANDOM = 1
      HASH_PARTITIONED = 2
      RANGE_PARTITIONED = 3
      VALUE_MAP = { 0 => "UNPARTITIONED", 1 => "RANDOM", 2 => "HASH_PARTITIONED", 3 => "RANGE_PARTITIONED" }
      VALID_VALUES = Set.new([UNPARTITIONED, RANDOM, HASH_PARTITIONED, RANGE_PARTITIONED]).freeze
    end

    class TDataPartition
      include ::Thrift::Struct, ::Thrift::Struct_Union
      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 }
      }

      def struct_fields; FIELDS; end

      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

      ::Thrift::Struct.generate_accessors self
    end

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
impala-0.1.6 lib/impala/protocol/partitions_types.rb
impala-0.1.5 lib/impala/protocol/partitions_types.rb
impala-0.1.4 lib/impala/protocol/partitions_types.rb
impala-0.1.3 lib/impala/protocol/partitions_types.rb
impala-0.1.2 lib/impala/protocol/partitions_types.rb
impala-0.1.1 lib/impala/protocol/partitions_types.rb
impala-0.1.0 lib/impala/protocol/partitions_types.rb