Class: Impala::Protocol::TDdlExecRequest

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

Constant Summary collapse

DDL_TYPE =
1
DATABASE =
2
DESCRIBE_TABLE =
3
SHOW_PATTERN =
4
FIELDS =
{
DDL_TYPE => { :type => ::Thrift::Types::I32, :name => 'ddl_type', :enum_class => Impala::Protocol::TDdlType },
DATABASE => { :type => ::Thrift::Types::STRING, :name => 'database', :optional => true },
DESCRIBE_TABLE => { :type => ::Thrift::Types::STRING, :name => 'describe_table', :optional => true },
SHOW_PATTERN => { :type => ::Thrift::Types::STRING, :name => 'show_pattern', :optional => true }
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



300
# File 'lib/impala/protocol/frontend_types.rb', line 300

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


302
303
304
305
306
307
# File 'lib/impala/protocol/frontend_types.rb', line 302

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