Class: Impala::Protocol::TDataSink
- Inherits:
-
Object
- Object
- Impala::Protocol::TDataSink
- Includes:
- Thrift::Struct, Thrift::Struct_Union
- Defined in:
- lib/impala/protocol/data_sinks_types.rb
Constant Summary collapse
- TYPE =
1
- STREAM_SINK =
2
- TABLE_SINK =
3
- FIELDS =
{ TYPE => { :type => ::Thrift::Types::I32, :name => 'type', :enum_class => Impala::Protocol::TDataSinkType }, STREAM_SINK => { :type => ::Thrift::Types::STRUCT, :name => 'stream_sink', :class => Impala::Protocol::TDataStreamSink, :optional => true }, TABLE_SINK => { :type => ::Thrift::Types::STRUCT, :name => 'table_sink', :class => Impala::Protocol::TTableSink, :optional => true } }
Instance Method Summary collapse
Instance Method Details
#struct_fields ⇒ Object
94 |
# File 'lib/impala/protocol/data_sinks_types.rb', line 94 def struct_fields; FIELDS; end |
#validate ⇒ Object
96 97 98 99 100 101 |
# File 'lib/impala/protocol/data_sinks_types.rb', line 96 def validate raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type unless @type.nil? || Impala::Protocol::TDataSinkType::VALID_VALUES.include?(@type) raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!') end end |