Class: Impala::Protocol::TAggregateExpr

Inherits:
Object
  • Object
show all
Includes:
Thrift::Struct, Thrift::Struct_Union
Defined in:
lib/impala/protocol/exprs_types.rb

Constant Summary collapse

IS_STAR =
1
IS_DISTINCT =
2
OP =
3
FIELDS =
{
IS_STAR => { :type => ::Thrift::Types::BOOL, :name => 'is_star' },
IS_DISTINCT => { :type => ::Thrift::Types::BOOL, :name => 'is_distinct' },
OP => { :type => ::Thrift::Types::I32, :name => 'op', :enum_class => Impala::Protocol::TAggregationOp }
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



62
# File 'lib/impala/protocol/exprs_types.rb', line 62

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


64
65
66
67
68
69
70
71
# File 'lib/impala/protocol/exprs_types.rb', line 64

def validate
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field is_star is unset!') if @is_star.nil?
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field is_distinct is unset!') if @is_distinct.nil?
  raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field op is unset!') unless @op
  unless @op.nil? || Impala::Protocol::TAggregationOp::VALID_VALUES.include?(@op)
    raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field op!')
  end
end