# # Autogenerated by Thrift Compiler (0.8.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # require 'types_types' require 'impala_internal_service_types' require 'plan_nodes_types' require 'planner_types' require 'descriptors_types' module Impala module Protocol module TDdlType SHOW_TABLES = 0 SHOW_DBS = 1 USE = 2 DESCRIBE = 3 VALUE_MAP = { 0 => "SHOW_TABLES", 1 => "SHOW_DBS", 2 => "USE", 3 => "DESCRIBE" } VALID_VALUES = Set.new([SHOW_TABLES, SHOW_DBS, USE, DESCRIBE]).freeze end class TGetTablesParams include ::Thrift::Struct, ::Thrift::Struct_Union DB = 1 PATTERN = 2 FIELDS = { DB => { :type => ::Thrift::Types::STRING, :name => 'db', :optional => true }, PATTERN => { :type => ::Thrift::Types::STRING, :name => 'pattern', :optional => true } } def struct_fields; FIELDS; end def validate end ::Thrift::Struct.generate_accessors self end class TGetTablesResult include ::Thrift::Struct, ::Thrift::Struct_Union TABLES = 1 FIELDS = { TABLES => { :type => ::Thrift::Types::LIST, :name => 'tables', :element => { :type => ::Thrift::Types::STRING } } } def struct_fields; FIELDS; end def validate end ::Thrift::Struct.generate_accessors self end class TGetDbsParams include ::Thrift::Struct, ::Thrift::Struct_Union PATTERN = 1 FIELDS = { PATTERN => { :type => ::Thrift::Types::STRING, :name => 'pattern', :optional => true } } def struct_fields; FIELDS; end def validate end ::Thrift::Struct.generate_accessors self end class TGetDbsResult include ::Thrift::Struct, ::Thrift::Struct_Union DBS = 1 FIELDS = { DBS => { :type => ::Thrift::Types::LIST, :name => 'dbs', :element => { :type => ::Thrift::Types::STRING } } } def struct_fields; FIELDS; end def validate end ::Thrift::Struct.generate_accessors self end class TColumnDesc include ::Thrift::Struct, ::Thrift::Struct_Union COLUMNNAME = 1 COLUMNTYPE = 2 FIELDS = { COLUMNNAME => { :type => ::Thrift::Types::STRING, :name => 'columnName' }, COLUMNTYPE => { :type => ::Thrift::Types::I32, :name => 'columnType', :enum_class => Impala::Protocol::TPrimitiveType } } def struct_fields; FIELDS; end def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columnName is unset!') unless @columnName raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columnType is unset!') unless @columnType unless @columnType.nil? || Impala::Protocol::TPrimitiveType::VALID_VALUES.include?(@columnType) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field columnType!') end end ::Thrift::Struct.generate_accessors self end class TDescribeTableParams include ::Thrift::Struct, ::Thrift::Struct_Union DB = 1 TABLE_NAME = 2 FIELDS = { DB => { :type => ::Thrift::Types::STRING, :name => 'db', :optional => true }, TABLE_NAME => { :type => ::Thrift::Types::STRING, :name => 'table_name' } } def struct_fields; FIELDS; end def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field table_name is unset!') unless @table_name end ::Thrift::Struct.generate_accessors self end class TDescribeTableResult include ::Thrift::Struct, ::Thrift::Struct_Union COLUMNS = 1 FIELDS = { COLUMNS => { :type => ::Thrift::Types::LIST, :name => 'columns', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TColumnDesc } } } def struct_fields; FIELDS; end def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columns is unset!') unless @columns end ::Thrift::Struct.generate_accessors self end class TSessionState include ::Thrift::Struct, ::Thrift::Struct_Union DATABASE = 1 FIELDS = { DATABASE => { :type => ::Thrift::Types::STRING, :name => 'database' } } def struct_fields; FIELDS; end def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field database is unset!') unless @database end ::Thrift::Struct.generate_accessors self end class TClientRequest include ::Thrift::Struct, ::Thrift::Struct_Union STMT = 1 QUERYOPTIONS = 2 SESSIONSTATE = 3 FIELDS = { STMT => { :type => ::Thrift::Types::STRING, :name => 'stmt' }, QUERYOPTIONS => { :type => ::Thrift::Types::STRUCT, :name => 'queryOptions', :class => Impala::Protocol::TQueryOptions }, SESSIONSTATE => { :type => ::Thrift::Types::STRUCT, :name => 'sessionState', :class => Impala::Protocol::TSessionState } } def struct_fields; FIELDS; end def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field stmt is unset!') unless @stmt raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field queryOptions is unset!') unless @queryOptions raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionState is unset!') unless @sessionState end ::Thrift::Struct.generate_accessors self end class TResultSetMetadata include ::Thrift::Struct, ::Thrift::Struct_Union COLUMNDESCS = 1 FIELDS = { COLUMNDESCS => { :type => ::Thrift::Types::LIST, :name => 'columnDescs', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TColumnDesc } } } def struct_fields; FIELDS; end def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columnDescs is unset!') unless @columnDescs end ::Thrift::Struct.generate_accessors self end class TCatalogUpdate include ::Thrift::Struct, ::Thrift::Struct_Union TARGET_TABLE = 1 DB_NAME = 2 CREATED_PARTITIONS = 3 FIELDS = { TARGET_TABLE => { :type => ::Thrift::Types::STRING, :name => 'target_table' }, DB_NAME => { :type => ::Thrift::Types::STRING, :name => 'db_name' }, CREATED_PARTITIONS => { :type => ::Thrift::Types::SET, :name => 'created_partitions', :element => { :type => ::Thrift::Types::STRING } } } def struct_fields; FIELDS; end def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field target_table is unset!') unless @target_table raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field db_name is unset!') unless @db_name raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field created_partitions is unset!') unless @created_partitions end ::Thrift::Struct.generate_accessors self end class TFinalizeParams include ::Thrift::Struct, ::Thrift::Struct_Union IS_OVERWRITE = 1 HDFS_BASE_DIR = 2 TABLE_NAME = 3 TABLE_DB = 4 FIELDS = { IS_OVERWRITE => { :type => ::Thrift::Types::BOOL, :name => 'is_overwrite' }, HDFS_BASE_DIR => { :type => ::Thrift::Types::STRING, :name => 'hdfs_base_dir' }, TABLE_NAME => { :type => ::Thrift::Types::STRING, :name => 'table_name' }, TABLE_DB => { :type => ::Thrift::Types::STRING, :name => 'table_db' } } def struct_fields; FIELDS; end def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field is_overwrite is unset!') if @is_overwrite.nil? raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field hdfs_base_dir is unset!') unless @hdfs_base_dir raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field table_name is unset!') unless @table_name raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field table_db is unset!') unless @table_db end ::Thrift::Struct.generate_accessors self end class TQueryExecRequest include ::Thrift::Struct, ::Thrift::Struct_Union DESC_TBL = 1 FRAGMENTS = 2 DEST_FRAGMENT_IDX = 3 PER_NODE_SCAN_RANGES = 4 RESULT_SET_METADATA = 5 FINALIZE_PARAMS = 6 QUERY_GLOBALS = 7 FIELDS = { DESC_TBL => { :type => ::Thrift::Types::STRUCT, :name => 'desc_tbl', :class => Impala::Protocol::TDescriptorTable, :optional => true }, FRAGMENTS => { :type => ::Thrift::Types::LIST, :name => 'fragments', :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TPlanFragment } }, DEST_FRAGMENT_IDX => { :type => ::Thrift::Types::LIST, :name => 'dest_fragment_idx', :element => { :type => ::Thrift::Types::I32 }, :optional => true }, PER_NODE_SCAN_RANGES => { :type => ::Thrift::Types::MAP, :name => 'per_node_scan_ranges', :key => { :type => ::Thrift::Types::I32 }, :value => { :type => ::Thrift::Types::LIST, :element => { :type => ::Thrift::Types::STRUCT, :class => Impala::Protocol::TScanRangeLocations } }, :optional => true }, RESULT_SET_METADATA => { :type => ::Thrift::Types::STRUCT, :name => 'result_set_metadata', :class => Impala::Protocol::TResultSetMetadata, :optional => true }, FINALIZE_PARAMS => { :type => ::Thrift::Types::STRUCT, :name => 'finalize_params', :class => Impala::Protocol::TFinalizeParams, :optional => true }, QUERY_GLOBALS => { :type => ::Thrift::Types::STRUCT, :name => 'query_globals', :class => Impala::Protocol::TQueryGlobals } } def struct_fields; FIELDS; end def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field fragments is unset!') unless @fragments raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field query_globals is unset!') unless @query_globals end ::Thrift::Struct.generate_accessors self end class TDdlExecRequest include ::Thrift::Struct, ::Thrift::Struct_Union 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 } } def struct_fields; FIELDS; end 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 ::Thrift::Struct.generate_accessors self end class TExecRequest include ::Thrift::Struct, ::Thrift::Struct_Union 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 } } def struct_fields; FIELDS; end 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 ::Thrift::Struct.generate_accessors self end end end