Class: Impala::Protocol::TExecRequest

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

Constant Summary collapse

STMT_TYPE =
1
SQL_STMT =
2
REQUEST_ID =
3
QUERY_OPTIONS =
4
QUERY_EXEC_REQUEST =
5
DDL_EXEC_REQUEST =
6
RESULT_SET_METADATA =
7
FIELDS =
{
STMT_TYPE => { :type => ::Thrift::Types::I32, :name => 'stmt_type', :enum_class => Impala::Protocol::TStmtType },
SQL_STMT => { :type => ::Thrift::Types::STRING, :name => 'sql_stmt', :optional => true },
REQUEST_ID => { :type => ::Thrift::Types::STRUCT, :name => 'request_id', :class => Impala::Protocol::TUniqueId },
QUERY_OPTIONS => { :type => ::Thrift::Types::STRUCT, :name => 'query_options', :class => Impala::Protocol::TQueryOptions },
QUERY_EXEC_REQUEST => { :type => ::Thrift::Types::STRUCT, :name => 'query_exec_request', :class => Impala::Protocol::TQueryExecRequest, :optional => true },
DDL_EXEC_REQUEST => { :type => ::Thrift::Types::STRUCT, :name => 'ddl_exec_request', :class => Impala::Protocol::TDdlExecRequest, :optional => true },
RESULT_SET_METADATA => { :type => ::Thrift::Types::STRUCT, :name => 'result_set_metadata', :class => Impala::Protocol::TResultSetMetadata, :optional => true }
}

Instance Method Summary collapse

Instance Method Details

#struct_fieldsObject



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

def struct_fields; FIELDS; end

#validateObject

Raises:

  • (::Thrift::ProtocolException)


334
335
336
337
338
339
340
341
# File 'lib/impala/protocol/frontend_types.rb', line 334

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